Browse Source

Install pylauncher when target is Py 2, not build environment

Closes gh-23
Thomas Kluyver 11 năm trước cách đây
mục cha
commit
5beb20f420
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      nsist/__init__.py
  2. 1 1
      nsist/nsiswriter.py

+ 1 - 1
nsist/__init__.py

@@ -273,7 +273,7 @@ from {module} import {func}
             if e.errno != errno.EEXIST:
                 raise e
         self.fetch_python()
-        if PY2:
+        if self.py_version < '3.3':
             self.fetch_pylauncher()
         
         self.prepare_shortcuts()

+ 1 - 1
nsist/nsiswriter.py

@@ -27,7 +27,7 @@ class NSISFileWriter(object):
                 ';UNINSTALL_DIRECTORIES': self.dirs_uninstall,
                 ';UNINSTALL_SHORTCUTS': self.shortcuts_uninstall,
         }
-        if PY2:
+        if installerbuilder.py_version < '3.3':
             self.template_fields.update({
                 ';PYLAUNCHER_INSTALL': self.pylauncher_install,
                 ';PYLAUNCHER_HELP': self.pylauncher_help})