PACKAGE_DATA = {} import bumps from bumps.gui.resources import resources as gui_resources NAME = 'Bumps' # Until we figure out why packages=... doesn't work reliably, # use py2app_main with explicit imports of everything we # might need. #SCRIPT = 'py2app_main.py' SCRIPT = 'bin/bumps_gui' VERSION = bumps.__version__ ICON = 'extra/bumps.icns' ID = 'Bumps' COPYRIGHT = 'This program is public domain' DATA_FILES = gui_resources.data_files() plist = dict(CFBundleIconFile=ICON, CFBundleName=NAME, CFBundleShortVersionString=' '.join([NAME, VERSION]), CFBundleGetInfoString=NAME, CFBundleExecutable=NAME, CFBundleIdentifier='org.reflectometry.%s' % ID, NSHumanReadableCopyright=COPYRIGHT) app_data = dict(script=SCRIPT, plist=plist) py2app_opt = dict(argv_emulation=True, packages=packages, includes=includes, excludes=excludes, iconfile=ICON,
manifest = manifest_for_python26 elif sys.version_info >= (2, 5): manifest = manifest_for_python25 # Create a list of all files to include along side the executable being built # in the dist directory tree. Each element of the data_files list is a tuple # consisting of a path (relative to dist\) and a list of files in that path. data_files = [] # Add resource files that need to reside in the same directory as the image. data_files.append(('.', [os.path.join('.', 'LICENSE.txt')])) data_files.append(('.', [os.path.join('.', 'README.txt')])) data_files.append(('.', [os.path.join('.', 'bin', 'bumps_launch.bat')])) # Add application specific data files from the bumps\bumps-data folder. data_files += gui_resources.data_files() # Add data files from the matplotlib\mpl-data folder and its subfolders. # For matploblib prior to version 0.99 see the examples at the end of the file. data_files += matplotlib.get_py2exe_datafiles() # Add data files from the periodictable\xsf folder. data_files += periodictable.data_files() # Add example directories and their files. An empty directory is ignored. # Note that Inno Setup will determine where these files will be placed such as # C:\My Documents\... instead of the installation folder. for path in glob.glob(os.path.join('examples', '*')): if os.path.isdir(path): for file in glob.glob(os.path.join(path, '*.*')): data_files.append((path, [file]))
from bumps.gui.resources import resources as gui_resources # The exported API names are not used within the bumps package, so they # need to be listed explicitly. hiddenimports = ['names'] # Convert [(dir, [f1,f2, ...]), ...] returned by gui_resource.data_files() # into [(f1, dir), (f2, dir), ...] expected for datas. datas = [ (fname,dirname) for dirname, filelist in gui_resources.data_files() for fname in filelist ]
PACKAGE_DATA = {} import bumps from bumps.gui.resources import resources as gui_resources NAME = 'Bumps' # Until we figure out why packages=... doesn't work reliably, # use py2app_main with explicit imports of everything we # might need. #SCRIPT = 'py2app_main.py' SCRIPT = 'bin/bumps_gui' VERSION = bumps.__version__ ICON = 'extra/bumps.icns' ID = 'Bumps' COPYRIGHT = 'This program is public domain' DATA_FILES = gui_resources.data_files() plist = dict( CFBundleIconFile = ICON, CFBundleName = NAME, CFBundleShortVersionString = ' '.join([NAME, VERSION]), CFBundleGetInfoString = NAME, CFBundleExecutable = NAME, CFBundleIdentifier = 'org.reflectometry.%s' % ID, NSHumanReadableCopyright = COPYRIGHT ) app_data = dict(script=SCRIPT, plist=plist) py2app_opt = dict(argv_emulation=True, packages=packages,
from bumps.gui.resources import resources as gui_resources # The exported API names are not used within the bumps package, so they # need to be listed explicitly. hiddenimports = ['names'] # Convert [(dir, [f1,f2, ...]), ...] returned by gui_resource.data_files() # into [(f1, dir), (f2, dir), ...] expected for datas. datas = [(fname, dirname) for dirname, filelist in gui_resources.data_files() for fname in filelist]
# Select the appropriate manifest to use. manifest = manifest_for_python26 if sys.version_info >= (2, 6) else manifest_for_python25 # Create a list of all files to include along side the executable being built # in the dist directory tree. Each element of the data_files list is a tuple # consisting of a path (relative to dist\) and a list of files in that path. data_files = [] # Add resource files that need to reside in the same directory as the image. data_files.append(('.', [os.path.join('.', 'LICENSE.txt')])) data_files.append(('.', [os.path.join('.', 'README.rst')])) data_files.append(('.', [os.path.join('.', 'bin', 'launch.bat')])) # Add application specific data files from the bumps\bumps-data folder. data_files += gui_resources.data_files() # Add data files from the matplotlib\mpl-data folder and its subfolders. # For matploblib prior to version 0.99 see the examples at the end of the file. data_files += matplotlib.get_py2exe_datafiles() # Add example directories and their files. An empty directory is ignored. # Note that Inno Setup will determine where these files will be placed such as # C:\My Documents\... instead of the installation folder. for path in glob.glob(os.path.join('doc', 'tutorial', '*')): if os.path.isdir(path): for file in glob.glob(os.path.join(path, '*.*')): data_files.append((path, [file])) else: data_files.append(('doc', [path]))