Commits

Anonymous committed 3b7e30c

Allow setup.py to be run using Python 3.0; subunit won't work for now though :(

  • Participants
  • Parent commits ced7e35

Comments (0)

Files changed (1)

 from fileinput import input
 from os import mkdir, remove
 from os.path import exists
-from sys import executable
+from sys import executable, version_info
 
 pc_raw = Popen("parrot_config --dump", shell=True, stdout=PIPE).stdout.readlines()
 if not pc_raw:
-    print "\nplease check parrot_config is in your PATH!"
+    print("\nplease check parrot_config is in your PATH!")
     exit(1)
     
 pc = {}
 rx = compile("(.*) => '(.*)'")
 
 for l in pc_raw:
+    if version_info[0] == 3:
+        l = l.decode()
     m = rx.match(l)
     if m:
         pc[m.group(1)] = m.group(2)
 
 class help_pynie(build):
     def run(self):
-        print """
+        print("""
             Following targets are available for the user:
 
               build:             pynie.pbc and pynie$(EXE) executable
               clean:             Basic cleaning up.
 
               help:              Print this help message.        
-        """
+        """)
 
 setup(name='Pynie',
       version='0.1',