build.py 1.26 KB
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']
eric pellegrini's avatar
eric pellegrini committed
9
    project_dir = os.environ['CI_PROJECT_DIR']
10

eric pellegrini's avatar
eric pellegrini committed
11
    APP = [os.path.join(project_dir,'Scripts','mdanse_gui')]
12

13
14
    PLIST = {
        u'CFBundleName': u'MDANSE',
15
        u'CFBundleShortVersionString': version,
16
        u'CFBundleVersion': version,
17
        u'CFBundleIdentifier': u'eu.ill.MDANSE-'+version,
18
        u'LSApplicationCategoryType': u'public.app-category.science'
19
20
    }
    OPTIONS = {
21
        'argv_emulation': False,# has to be False otherwise triggers problems with wxPython which lose some events that are captured by OS
eric pellegrini's avatar
eric pellegrini committed
22
        'iconfile': os.path.join(project_dir,'MDANSE','GUI','Icons','mdanse.icns'),
23
24
        'excludes': 'PyQt4',
		'matplotlib_backends': '-',
25
        'optimize': '1',
26
        'plist': PLIST,
eric pellegrini's avatar
eric pellegrini committed
27
28
        'bdist_base': os.environ['CI_TEMP_BUILD_DIR'],
        'dist_dir': os.path.join(os.environ['CI_TEMP_DIR'],'dist'),
29
        'graph': False,
30
31
        'xref': False,
        'packages' : ["MDANSE","MMTK","Scientific"]
32
33
34
    }

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