forked from firstlookmedia/autocanary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
83 lines (75 loc) · 2.69 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
80
81
82
83
"""
AutoCanary | https://firstlook.org/code/autocanary
Copyright (c) 2015 First Look Media
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
import os, sys, platform
system = platform.system()
if system == "Windows":
from distutils.core import setup
else:
from setuptools import setup
version = open('version').read().strip()
if system == 'Linux':
setup(
name='autocanary',
version=version,
author='Micah Lee',
author_email='micah.lee@firstlook.org',
packages=['autocanary'],
include_package_data=True,
scripts=['install/autocanary'],
data_files=[
(os.path.join(sys.prefix, 'share/applications'), ['install/autocanary.desktop']),
(os.path.join(sys.prefix, 'share/pixmaps'), ['install/autocanary.xpm']),
(os.path.join(sys.prefix, 'share/autocanary'), ['share/icon.png'])
]
)
elif system == 'Darwin':
setup(
name='AutoCanary',
version=version,
app=['autocanary.py'],
data_files=[],
options={
'py2app': {
'argv_emulation': True,
'iconfile':'install/icon.icns',
'includes': ['sip', 'PyQt4', 'PyQt4.QtCore', 'PyQt4.QtGui'],
'excludes': [
'PyQt4.QtDesigner', 'PyQt4.QtNetwork',
'PyQt4.QtOpenGL', 'PyQt4.QtScript',
'PyQt4.QtSql', 'PyQt4.QtTest',
'PyQt4.QtWebKit', 'PyQt4.QtXml',
'PyQt4.phonon', 'PyQt4.QtDeclarative',
'PyQt4.QtHelp', 'PyQt4.QtMultimedia',
'PyQt4.QtScript', 'PyQt4.QtScriptTools',
'PyQt4.QtSvg', 'PyQt4.QtXmlPatterns']
}
},
setup_requires=['py2app'],
)
elif system == 'Windows':
import py2exe
setup(
name='AutoCanary',
version=version,
data_files=[('', ['share/icon.png'])],
windows=[{'script':'autocanary.py'}],
options={
'py2exe': {
'includes': ['sip', 'PyQt4'],
'bundle_files': 1,
'compressed': True
}
}
)