Anonymous avatar Anonymous committed d406a52

Fix up version check so it works with Parrot 2.0. Thanks to François
Perrad for the patch.

Comments (0)

Files changed (1)

 if not pc_raw:
     print("\nplease check parrot_config is in your PATH!")
     exit(1)
-    
+
 pc = {}
 rx = compile("(.*) => '(.*)'")
 
         pc[m.group(1)] = m.group(2)
 
 pv = pc['VERSION'].split('.')
-if int(pv[0]) < 1 or int(pv[1]) < 4:
+if int(pv[0]) == 0 or (int(pv[0]) == 1 and int(pv[1]) < 4):
     print("\nPlease use Parrot version 1.4 or higher")
     exit(1)
 
   'src/parser/indent.pir' ]
 
 BUILTINS_PIR = [
-  'src/builtins/funcs.pir', 
-  'src/builtins/helper.pir', 
-  'src/builtins/io.pir', 
-  'src/builtins/lists.pir', 
+  'src/builtins/funcs.pir',
+  'src/builtins/helper.pir',
+  'src/builtins/io.pir',
+  'src/builtins/lists.pir',
   'src/builtins/oper.pir',
   'src/classes/pynietype.pir',
   'src/classes/pynielist.pir',
   'pynie.pbc',
   'pynie%s' % pc['exe'],
   'installable_pynie%s' % pc['exe'] ]
-  
+
 def real_build():
     if not exists('include'):
         mkdir('include')
-        
+
     if newer_group(BUILTINS_PIR, 'include/gen_builtins.pir'):
         f = open('include/gen_builtins.pir', 'w')
         for l in input(BUILTINS_PIR): f.write(l)
 
     if newer('Grammar/Actions.nqp','include/gen_actions.pir'):
         spawn([PARROT, NQP, '--output=include/gen_actions.pir', '--encoding=fixed_8', '--target=pir', 'Grammar/Actions.nqp'])
-    
+
     if newer_group(SOURCES + BUILTINS_PIR, 'pynie.pbc'):
-        spawn([PARROT, '-o', 'pynie.pbc', 'pynie.pir'])    
-    
+        spawn([PARROT, '-o', 'pynie.pbc', 'pynie.pir'])
+
     if newer('pynie.pbc', 'pynie%s' % pc['exe']):
-        spawn([PBC_TO_EXE, 'pynie.pbc'])    
-  
+        spawn([PBC_TO_EXE, 'pynie.pbc'])
+
 class build_pynie(build):
     def run(self):
         real_build()
         real_build()
         spawn([executable, 'runtests.py'])
         build.run(self)
-        
+
 class clean_pynie(build):
     def run(self):
         [remove(f) for f in CLEANUPS if exists(f)]
         build.run(self)
-        
+
 
 class help_pynie(build):
     def run(self):
 
               clean:             Basic cleaning up.
 
-              help:              Print this help message.        
+              help:              Print this help message.
         """)
 
 setup(name='Pynie',
       }
 )
 
-    
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.