Commits

Ivan Andrianov  committed 6ece8b4

Setup script fix.

  • Participants
  • Parent commits 5f02f55

Comments (0)

Files changed (1)

 #################################################################################
 
 from distutils.core import setup
-from os import name
+from os import rename, remove
+from sys import argv
 
 projectName = 'fftranscoder'
 projectVersion = '0.1'
 projectDescription = 'Multimedia transcoder based on FFmpeg'
 projectLicense = 'MIT'
 
-if name == 'nt':
+if argv[1] == 'py2exe':
     import py2exe
 
     projectWindows = ['fftranscoder/__init__.py']
           description = projectDescription,
           license = projectLicense,
           windows = projectWindows)
+    #TODO: resolve sip module problem
+
+    try:
+        remove('dist/fftranscoder.exe')
+    except Exception:
+        pass
+    rename('dist/__init__.exe', 'dist/fftranscoder.exe')
 else:
     projectPackages = ['fftranscoder']
     setup(name = projectName,