-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changes to allow packaging with cx_freeze. Unfortunately I had to cha…
…nge some packages such as matplotlib and tvtk so freezing will only work on my computer
- Loading branch information
1 parent
7c91b57
commit 2fcd300
Showing
6 changed files
with
62 additions
and
9 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 |
---|---|---|
|
@@ -3,4 +3,7 @@ __pycache__ | |
MANIFEST | ||
/logfiles | ||
/testfiles | ||
defaults.pkl | ||
defaults.pkl | ||
/build | ||
/dist | ||
main.spec |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import sys | ||
import os | ||
from cx_Freeze import setup, Executable | ||
import cx_Freeze.hooks | ||
def hack(finder, module): | ||
return | ||
cx_Freeze.hooks.load_matplotlib = hack | ||
import scipy | ||
import matplotlib | ||
from encodings import ascii | ||
from encodings import idna | ||
from encodings import unicode_escape | ||
|
||
scipy_path = os.path.dirname(scipy.__file__) #use this if you are also using scipy in your application | ||
|
||
build_exe_options = {"packages": ["pyface.ui.qt4", "tvtk.vtk_module", "tvtk.pyface.ui.wx", "matplotlib.backends.backend_qt4",'pkg_resources._vendor','pkg_resources.extern','pygments.lexers', | ||
'tvtk.pyface.ui.qt4'], | ||
"include_files": [(str(scipy_path), "scipy"), #for scipy | ||
(matplotlib.get_data_path(), "mpl-data"),'/home/jannick/python_programs/OpenDFT/data'], | ||
"includes":['numpy.core._methods', 'numpy.lib.format','PyQt4.QtCore','PyQt4.QtGui'], | ||
'excludes':'Tkinter' | ||
} | ||
|
||
executables = [ | ||
Executable('main.py', targetName="OpenDFT") | ||
] | ||
|
||
setup(name='OpenDFT', | ||
version='1.0', | ||
description='OpenDFT', | ||
options = {"build_exe": build_exe_options}, | ||
executables=executables | ||
) |
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
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
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
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