-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
79 lines (74 loc) · 2.88 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#
# Copyright (c) 2014, Scott J Maddox
#
# This file is part of Plot Liberator.
#
# Plot Liberator is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Plot Liberator is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Plot Liberator. If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
# std lib imports
import sys
import os.path
# third party imports
import glob
from setuptools import setup, find_packages
# read in __version__
exec(open('src/plotliberator/version.py').read())
# If on Mac OS X, build an app bundle using py2app
if sys.platform == 'darwin':
# extra arguments for mac py2app to associate files
plist = dict(
CFBundleName='Plot Liberator',
CFBundleShortVersionString=__version__,
CFBundleIdentifier='org.python.plotliberator',
)
py2app_opts = dict(
argv_emulation=False,
includes=['PySide', 'PySide.QtCore', 'PySide.QtGui',
'math'],
excludes=['PySide.QtNetwork'],
plist=plist,
#iconfile=icons/plotliberator.icns',
)
extra_options = dict(
setup_requires=['py2app'],
app=['src/plotliberator/main.py'],
options=dict(
py2app=py2app_opts
)
)
elif sys.platform == 'win32':
extra_options = dict(
setup_requires=['py2exe'],
app=['src/plotliberator/main.py'],
)
else:
extra_options = dict(
# Normally unix-like platforms will use "setup.py install"
# and install the main script as such
scripts=['src/plotliberator/main.py'],
)
setup(name='plotliberator',
version=__version__, # read from version.py
description='A GUI for extracting data from plot images',
long_description=open('README.rst').read(),
url='http://scott-maddox.github.io/plotliberator',
author='Scott J. Maddox',
author_email='smaddox@utexas.edu',
license='AGPLv3',
packages=['plotliberator',
],
package_dir={'plotliberator': 'src/plotliberator'},
zip_safe=True,
**extra_options)