mcsas.cxfreeze module¶
Overview¶
Creates a standalone program package for a particular platform to be run by restricted users without installing any additional packages.
This script is executable and has to be run on the platform for which a package shall be created. Please follow the instructions below for each particular platform.
Common Package Dependencies:
- Python 2.7
- Qt 4.8 + PySide
- NumPy and SciPy
- In order to work around freeze failures with newer versions it is recommended to stick with Numpy 1.7 and SciPy 1.12 which was tested successfully.
- matplotlib
In addition to the dependencies of the MCSAS package listed above the cx_Freeze package is used for freezing the python source code structure into a standalone package.
Working with Source Code Repositories¶
In order to download the latest source code repositories of packages such as MCSAS or cx_Freeze a client to Git and Mercurial is required. There are several available, for both Mac OS X and Windows the SourceTree program is recommended.
Windows¶
A self-contained archive consisting of MCSAS.exe
and all necessary
libraries and files is created by the following command executed in the
MCSAS folder:
> python cxfreeze.py build_exe
Requirements¶
On a fresh installation of Windows 7 the following packages are required:
matplotlib 1.4.2 and its requirements:
- Six 1.9.0
Install it on the command line by:
pip install six-1.9.0-py2.py3-none-any.whlh5py HDF5 support, install one of the precompiled Windows packages, such as h5py-2.4.0.win32-py2.7.exe
Mac OS X¶
After installing the required packages below a disk image file (.dmg) consisting of the application bundle is created by:
$ /usr/local/bin/python2 cxfreeze.py bdist_dmg
Alternatively, for testing purposes the bundle can be created without packaging into a disk image by:
$ /usr/local/bin/python2 cxfreeze.py bdist_mac
Requirements¶
On a fresh installation of OS X 10.8 the following packages are required:
- Xcode command line tools: for build essentials such as a compiler
- matplotlib 1.4.2
Install it on the command line by:
$ /usr/local/bin/pip install matplotlib-1.4.2-*.whlh5py HDF5 support, install HDF5 from source first:
$ cd hdf5-src $ ./configure --prefix=/usr/local $ make && sudo make install $ $ pip2 install h5pya modified cx_Freeze 4.3.4 with local modifications for successful app freezing on OS X
Download the source and install it on the command line by:
$ hg clone https://bitbucket.org/ibressler/cx_freeze $ cd cx_freeze $ hg co 4.x $ /usr/local/bin/python2 setup.py install
Ubuntu/Linux¶
Similar to the procedure on Windows a self-contained archive containing all necessary libraries and files is created by:
$ python cxfreeze.py build_exe
Requirements¶
On a fresh installation of Ubuntu Linux 14.04 LTS the following packages are required:
apt-get install git build-essential python-setuptools python-dev liblapack-dev libfreetype6-dev tk-dev
- PySide 1.2.4
- NumPy 1.7.2
- SciPy 0.12.1
- matplotlib 1.4.2
- cx_Freeze 4.3.4
- future 0.16.1
- h5py 2.2.1
Internals¶
-
class
Archiver
[source]¶ Bases:
object
-
archive
(targetPath)[source]¶ Creates an archive from the given absolute target directory path. The archive file will have the base name of the last directory of the given path.
-
execName
¶
-
-
class
Archiver7z
(filetype='7z')[source]¶ Bases:
cxfreeze.Archiver
-
class
ArchiverZip
[source]¶ Bases:
cxfreeze.Archiver