1. fab31
  2. zicbee-workshop

Commits

fab31  committed 3cc2dc7

executables use right python version

  • Participants
  • Parent commits 7966b3e
  • Branches default

Comments (0)

Files changed (1)

File _genexecutables.py

View file
 #!/usr/bin/env python
 __all__ = ['gen', 'executables']
 import os
+import sys
 
-script_base = """#!/usr/bin/env python
+script_base = """#!/usr/bin/env python%(pyver)s
 import os
 import sys
 DB_DIR = os.path.expanduser(os.getenv('ZICDB_PATH') or '~/.zicdb')
         pass
 
 def gen():
+    pyver = '.'.join(str(x) for x in sys.version_info[:2])
     for name, mod, starter in executables:
         _try_chmod(name, 0755)
         file(name, 'w').write(script_base%{
             'mod':mod,
+            'pyver': pyver,
             'exe':starter,
             })
         _try_chmod(name, 0755)