From: Ole Streicher <olebole@debian.org>
Date: Tue, 19 Dec 2017 21:19:47 +0100
Subject: Install pyraf script only for Python 3

---
 lib/pyraf_setup.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/pyraf_setup.py b/lib/pyraf_setup.py
index ddd1437..5aac682 100644
--- a/lib/pyraf_setup.py
+++ b/lib/pyraf_setup.py
@@ -25,6 +25,9 @@ def setup_hook(config):
 
         config['files']['scripts'] += '\n' + '\n'.join(additional_scripts)
 
+    if sys.version_info < (3,):
+        del config['files']['scripts']
+
 
 def build_ext_hook(command):
     """Adds the correct library directories for X11.  I've found that on Linux
