forked from CellProfiler/CellProfiler-Analyst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
45 lines (41 loc) · 1.49 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
from setuptools import setup, Extension
import sys
import os
import os.path
import numpy
# fix from
# http://mail.python.org/pipermail/pythonmac-sig/2008-June/020111.html
import pytz
pytz.zoneinfo = pytz.tzinfo
pytz.zoneinfo.UTC = pytz.UTC
import cpa.pilfix
from subprocess import call
import cpa.util.version
APPNAME = 'CellProfiler Analyst'
APP = ['CellProfiler-Analyst.py']
OPTIONS = {'argv_emulation': True,
'iconfile' : "cpa/icons/cpa.icns",
'includes' : [ 'scipy.sparse'],
'packages' : ['numpy', 'cpa', 'javabridge', 'bioformats'],
'excludes' : ['nose', 'wx.tools', 'Cython', 'pylab', 'Tkinter',
'scipy.weave', 'imagej'],
'resources' : [],
'plist': {
"LSArchitecturePriority": ["i386"],
"LSMinimumSystemVersion": "10.6.8",
"CFBundleName": "CellProfiler Analyst",
"CFBundleIdentifier": "org.cellprofiler.CellProfiler-Analyst",
"CFBundleShortVersionString": cpa.util.version.get_bundle_version(),
}
}
setup(
app=APP,
version=cpa.util.version.get_normalized_version(),
options={'py2app': OPTIONS},
setup_requires=['py2app'],
name = APPNAME,
)
if sys.argv[-1] == 'py2app':
a = "CellProfiler\\ Analyst"
call('find dist/{a}.app -name tests -type d | xargs rm -rf'.format(a=a), shell=True)
call('lipo dist/{a}.app/Contents/MacOS/{a} -thin i386 -output dist/{a}.app/Contents/MacOS/{a}'.format(a=a), shell=True)