ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change
on this file since 162c778 was
807560b,
checked in by Gervaise Alina <gervyh@…>, 13 years ago
|
move file out of scripts
|
-
Property mode set to
100644
|
File size:
969 bytes
|
Rev | Line | |
---|
[807560b] | 1 | """ |
---|
| 2 | Setup script to build a Mac app |
---|
| 3 | """ |
---|
| 4 | from setuptools import setup |
---|
| 5 | import sans.dataloader.readers |
---|
| 6 | import os |
---|
| 7 | |
---|
| 8 | #Data reader data files |
---|
| 9 | |
---|
| 10 | RESOURCES_FILES = os.path.join(sans.dataloader.readers.get_data_path(),'defaults.xml') |
---|
| 11 | |
---|
| 12 | # Locate libxml2 library |
---|
| 13 | lib_locs = ['/usr/local/lib', '/usr/lib'] |
---|
| 14 | libxml_path = None |
---|
| 15 | for item in lib_locs: |
---|
| 16 | libxml_path_test = '%s/libxml2.2.dylib' % item |
---|
| 17 | if os.path.isfile(libxml_path_test): |
---|
| 18 | libxml_path = libxml_path_test |
---|
| 19 | if libxml_path == None: |
---|
| 20 | raise RuntimeError, "Could not find libxml2 on the system" |
---|
| 21 | |
---|
| 22 | APP = ['PrView.py'] |
---|
| 23 | DATA_FILES = ['images', 'test', 'plugins'] |
---|
| 24 | OPTIONS = {'argv_emulation': True, |
---|
| 25 | 'packages': ['lxml'], |
---|
| 26 | 'iconfile': 'images/ball.icns', |
---|
| 27 | 'frameworks':[libxml_path], |
---|
| 28 | 'resources': RESOURCES_FILES |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | setup( |
---|
| 32 | app=APP, |
---|
| 33 | data_files=DATA_FILES, |
---|
| 34 | include_package_data= True, |
---|
| 35 | options={'py2app': OPTIONS}, |
---|
| 36 | setup_requires=['py2app'], |
---|
| 37 | ) |
---|
Note: See
TracBrowser
for help on using the repository browser.