-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from carlkl/master
@carlkl's changes for setup_win.py
- Loading branch information
Showing
1 changed file
with
50 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,50 @@ | ||
#!/usr/bin/env python | ||
""" | ||
Barion | ||
-- GUI Application -- | ||
Jul 2015 Xaratustrah | ||
Mar 2016 Xaratustrah | ||
""" | ||
|
||
from version import __version__ | ||
from distutils.core import setup | ||
import py2exe | ||
|
||
name = 'barion' | ||
|
||
pkgs = ['fortranformat'] | ||
|
||
includes = ['sip', | ||
'PyQt5', | ||
'PyQt5.QtWidgets', | ||
'PyQt5.QtCore', | ||
'PyQt5.QtGui'] | ||
|
||
excludes = ['pkg_resources', | ||
'doctest', | ||
'pdb', | ||
'optparse', | ||
'jsonschema', | ||
'tornado', | ||
'setuptools', | ||
'urllib2', | ||
'tkinter'] | ||
|
||
options = {'bundle_files': 3, | ||
# 'optimize': 2, | ||
'compressed': True, | ||
'includes': includes, | ||
'excludes': excludes, | ||
'packages': pkgs | ||
} | ||
|
||
datafiles = [("platforms", ["C:\\Python34\\Lib\\site-packages\\PyQt5\\plugins\\platforms\\qwindows.dll"]), | ||
("", [r"c:\windows\syswow64\MSVCP100.dll", r"c:\windows\syswow64\MSVCR100.dll"])] | ||
|
||
setup( | ||
name=name, | ||
version=__version__, | ||
url='https://github.com/xaratustrah/barion', | ||
license='GPLv.3', | ||
zipfile=None, | ||
data_files=datafiles, | ||
windows=[{ | ||
'script': 'barion.py', | ||
'icon_resources': [(1, 'rsrc/icon.ico')], | ||
'dest_base': name | ||
}], | ||
options={'py2exe': options} | ||
) | ||
#!/usr/bin/env python | ||
""" | ||
Barion | ||
-- GUI Application -- | ||
Jul 2015 Xaratustrah | ||
Mar 2016 Xaratustrah | ||
py2exe setup.py written with the help of | ||
http://stackoverflow.com/questions/31680439/exe-built-with-cx-freeze-pyqt5-python3-cant-import-extensionloader-pyqt5-qtwi | ||
and @carlkl | ||
""" | ||
|
||
from version import __version__ | ||
from distutils.core import setup | ||
import os, sys | ||
import py2exe | ||
from glob import glob | ||
import PyQt5 | ||
|
||
NAME="barion" | ||
data_files = [] | ||
qt_platform_plugins = [("platforms", glob(PyQt5.__path__[0] + r'\plugins\platforms\*.*'))] | ||
data_files.extend(qt_platform_plugins) | ||
|
||
sys.argv.append('py2exe') | ||
|
||
setup( | ||
name=NAME, | ||
version=__version__, | ||
url='https://github.com/xaratustrah/barion', | ||
license='GPLv.3', | ||
zipfile=None, | ||
data_files=data_files, | ||
windows=[ | ||
{ | ||
"script": "barion.py", | ||
'icon_resources': [(1, 'rsrc/icon.ico')] | ||
} | ||
], | ||
options={ | ||
"py2exe": { | ||
"includes":["sip", "atexit",], | ||
"compressed": True, | ||
"optimize": 2, | ||
'packages': ['fortranformat'] | ||
} | ||
} | ||
) |