summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-07-10 12:02:19 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-07-10 12:02:19 -0300
commit07686dfa07b03d5faa609a1554894aadf275a738 (patch)
treec97c7f997c0e8ebbdcb015150b5f583f6f0313a6 /setup.py
parentc0cc3f6f13ef8bc3dadec86bede2b286cea4e966 (diff)
parent2d7fcd6cbb65945c64fe9fa949a6d176f5dd0d6c (diff)
Merge remote-tracking branch 'chiiph/feature/package_osx_py2app' into develop
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py29
1 files changed, 28 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index bb1937cc..7cd48799 100755
--- a/setup.py
+++ b/setup.py
@@ -253,7 +253,8 @@ cmdclass["sdist"] = cmd_sdist
import platform
_system = platform.system()
-IS_LINUX = True if _system == "Linux" else False
+IS_LINUX = _system == "Linux"
+IS_MAC = _system == "Darwin"
data_files = []
@@ -267,6 +268,31 @@ if IS_LINUX:
["pkg/linux/bitmask-root"]),
]
+extra_options = {}
+
+if IS_MAC:
+ extra_options["app"] = ['src/leap/bitmask/app.py']
+ OPTIONS = {
+ 'argv_emulation': True,
+ 'plist': 'pkg/osx/Info.plist',
+ 'iconfile': 'pkg/osx/bitmask.icns',
+ }
+ extra_options["options"] = {'py2app': OPTIONS}
+ extra_options["setup_requires"] = ['py2app']
+
+ class jsonschema_recipe(object):
+ def check(self, dist, mf):
+ m = mf.findNode('jsonschema')
+ if m is None:
+ return None
+
+ # Don't put jsonschema in the site-packages.zip file
+ return dict(
+ packages=['jsonschema']
+ )
+
+ import py2app.recipes
+ py2app.recipes.jsonschema = jsonschema_recipe()
setup(
name="leap.bitmask",
@@ -305,4 +331,5 @@ setup(
entry_points={
'console_scripts': [leap_launcher]
},
+ **extra_options
)