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:

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:

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

    ( xcode461_cltools_10_86938245a.dmg )

  • Python 2.7.9

  • Qt 4.8.6

  • PySide 1.2.1 / Qt 4.8

  • NumPy 1.7.1

  • SciPy 0.12.0

  • matplotlib 1.4.2

    Install it on the command line by:

    $ /usr/local/bin/pip install matplotlib-1.4.2-*.whl
    
  • h5py HDF5 support, install HDF5 from source first:

    $ cd hdf5-src
    $ ./configure --prefix=/usr/local
    $ make && sudo make install
    $
    $ pip2 install h5py
    
  • a 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
getLogFilename()[source]

Warning

method ‘cxfreeze.Archiver.getLogFilename’ undocumented

class Archiver7z(filetype='7z')[source]

Bases: cxfreeze.Archiver

archive(targetPath)[source]

Warning

method ‘cxfreeze.Archiver7z.archive’ undocumented

class ArchiverZip[source]

Bases: cxfreeze.Archiver

archive(targetPath)[source]

Expects an absolute target directory path

includeModels(includeFilesLst)[source]

Warning

function ‘cxfreeze.includeModels’ undocumented

sanitizeVersionNumber(number)[source]

Removes non-digits to be compatible with pywin32