From 464567121e1ccc3209e6f79df58f67db696a081a Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Thu, 12 Jun 2014 16:50:46 -0700 Subject: [PATCH] more properly segment different platforms in setup.py --- setup.py | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/setup.py b/setup.py index 5f9e2df6..ac5a0046 100644 --- a/setup.py +++ b/setup.py @@ -13,18 +13,12 @@ if sys.argv[-1] == 'publish': sys.exit() version = open('version').read().strip() - -APP = None -DATA_FILES = [ - ('/usr/share/applications', ['setup/onionshare.desktop']), - ('/usr/share/pixmaps', ['setup/onionshare80.xpm']) -] -OPTIONS = None +args = {} if platform.system() == 'Darwin': - APP = ['setup/onionshare_osx.py'] - DATA_FILES = ['LICENSE', 'README.md', 'BUILD.md', 'version', 'onionshare', 'onionshare_gui'] - OPTIONS = { + args['data_files'] = ['LICENSE', 'README.md', 'BUILD.md', 'version', 'onionshare', 'onionshare_gui'] + args['app'] = ['setup/onionshare_osx.py'] + args['options'] = { 'py2app': { 'argv_emulation': True, 'iconfile': 'setup/onionshare.icns', @@ -36,6 +30,16 @@ if platform.system() == 'Darwin': } } +elif platform.system() == 'Windows': + pass + +else: + args['data_files'] = [ + ('/usr/share/applications', ['setup/onionshare.desktop']), + ('/usr/share/pixmaps', ['setup/onionshare80.xpm']) + ] + args['scripts'] = ['bin/onionshare', 'bin/onionshare-gui'] + setup( name='onionshare', version=version, @@ -44,16 +48,13 @@ setup( author='Micah Lee', author_email='micah@micahflee.com', url='https://github.com/micahflee/onionshare', + license="GPL v3", + keywords='onion, share, onionshare, tor, anonymous, web server', include_package_data=True, install_requires=[ 'flask >= 0.8', 'stem >= 1.1.0' ], - license="GPL v3", - keywords='onion, share, onionshare, tor, anonymous, web server', packages=['onionshare', 'onionshare_gui'], - scripts=['bin/onionshare', 'bin/onionshare-gui'], - data_files=DATA_FILES, - app=APP, - options=OPTIONS -) + **args +) \ No newline at end of file