forked from CellProfiler/CellProfiler-Analyst
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
53 lines (48 loc) · 1.83 KB
/
setup.py
File metadata and controls
53 lines (48 loc) · 1.83 KB
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
45
46
47
48
49
50
51
52
53
# =============================================================================
#
# Mac OS build file for CellProfiler-Analyst
#
# Run python setup.py py2app to build a dmg
#
# =============================================================================
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': False,
'iconfile' : "cpa/icons/cpa.icns",
'includes' : [ 'scipy.sparse'],
'packages' : ['numpy', 'cpa', 'javabridge', 'bioformats', 'PIL','sklearn'],
'excludes' : ['nose', 'wx.tools', 'Cython', 'pylab', 'Tkinter',
'scipy.weave', 'imagej','AppKit','CoreFoundation','Foundation','objc'],
'resources' : []
# 'plist': {
# "LSArchitecturePriority": ["x86_64"]
# "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)