build.py 1001 Bytes
Newer Older
1
2
3
4
5
6
7
# coding=utf-8
import sys
import os

if sys.platform.startswith('darwin'):
    from setuptools import setup

Jamie Hall's avatar
Jamie Hall committed
8
    version = os.environ['VERSION_NAME']
9

10
    APP = ['../../../Scripts/mdanse_gui']
11

12
13
    PLIST = {
        u'CFBundleName': u'MDANSE',
14
        u'CFBundleShortVersionString': version,
15
        u'CFBundleVersion': version,
16
        u'CFBundleIdentifier': u'eu.ill.MDANSE-'+version,
17
        u'LSApplicationCategoryType': u'public.app-category.science'
18
19
20
    }
    OPTIONS = {
        'argv_emulation': True,
21
        'iconfile': u'../../../MDANSE/GUI/Icons/mdanse.icns',
22
23
        'excludes': 'PyQt4',
		'matplotlib_backends': '-',
24
        'optimize': '1',
25
        'plist': PLIST,
Jamie Hall's avatar
Jamie Hall committed
26
27
        'bdist_base': '../Build/build',
        'dist_dir': '../Build/dist',
28
29
30
31
32
33
34
35
36
37
38
        'graph': False,
        'xref': False
    }

    setup(
        name="MDANSE",
        app=APP,
        options={'py2app': OPTIONS},
        setup_requires=['py2app']
    )
else:
39
    print 'No build_app implementation for your system.'