-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
79 lines (69 loc) · 2.19 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
# -*- encoding: utf-8 -*-
"""
Create OSX app
Usage:
python setup.py py2app
"""
import sys, os.path
from setuptools import setup
if sys.platform == 'win32':
import py2exe
def getversion():
if sys.platform == 'darwin':
_p = 'MAC'
elif sys.platform == 'win32':
_p = 'WIN'
else:
_p = 'x'
mainscript = os.path.join('src', 'main.py')
INCLUDES=['sip', 'PyQt4.QtCore', 'PyQt4.QtGui', 'lxml.objectify', 'lxml.etree', 'lxml._elementpath']
EXCLUDES=['PyQt4.QtDesigner', 'PyQt4.QtNetwork', 'PyQt4.QtOpenGL', 'PyQt4.QtScript', 'PyQt4.QtSql',
'PyQt4.QtTest', 'PyQt4.QtWebKit', 'PyQt4.QtXml', 'PyQt4.phonon']
if sys.platform == 'darwin':
extra_options = dict(
setup_requires=['py2app'],
app=[mainscript],
# Cross-platform applications generally expect sys.argv to
# be used for opening files.
options=dict(py2app=dict(
argv_emulation=True,
#iconfile='jottagui.icns',
#packages=['lxml'],
includes=INCLUDES,
excludes=EXCLUDES,
frameworks=['/usr/lib/libxml2.2.dylib',],
resources=['src/cacert.pem',],
plist=dict(CFBundleIdentifier='no.lurtgjort.apps.jottagui',
CFBundleShortVersionString='JottaGui, version 0.1',
NSSupportsSuddenTermination=False,
NSHumanReadableCopyright='[email protected] 2012-2014')
)
),
)
elif sys.platform == 'win32':
extra_options = dict(
setup_requires=['py2exe'],
windows=[mainscript],
packages=['gui','metadata',],
package_dir={},
options=dict(py2exe=dict(
#packages=['lxml'],
includes=INCLUDES,
excludes=EXCLUDES,
)
)
)
else:
extra_options = dict(
# Normally unix-like platforms will use "setup.py install"
# and install the main script as such
scripts=[mainscript],
)
setup(
name="JottaGui",
version="0.1",
author=u'Håvard Gulldahl',
author_email='[email protected]',
description='A simple JottaCloud client (unofficial)',
**extra_options
)