mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-18 18:07:37 +03:00
Restore ability to run on OSX 10.9.
This commit is contained in:
parent
6a32b5affc
commit
00360d1bc1
20
setup.py
20
setup.py
@ -51,7 +51,9 @@ APPLONGNAME = re.search(r"^applongname\s*=\s*'(.+)'", file('config.py').read(),
|
|||||||
VERSION = re.search(r"^appversion\s*=\s*'(.+)'", file('config.py').read(), re.MULTILINE).group(1)
|
VERSION = re.search(r"^appversion\s*=\s*'(.+)'", file('config.py').read(), re.MULTILINE).group(1)
|
||||||
SHORTVERSION = ''.join(VERSION.split('.')[:3])
|
SHORTVERSION = ''.join(VERSION.split('.')[:3])
|
||||||
|
|
||||||
PY2APP_OPTIONS = {'dist_dir': dist_dir,
|
if sys.platform=='darwin':
|
||||||
|
OPTIONS = { 'py2app':
|
||||||
|
{'dist_dir': dist_dir,
|
||||||
'optimize': 2,
|
'optimize': 2,
|
||||||
'packages': [ 'requests' ],
|
'packages': [ 'requests' ],
|
||||||
'frameworks': [ 'Sparkle.framework' ],
|
'frameworks': [ 'Sparkle.framework' ],
|
||||||
@ -62,9 +64,10 @@ PY2APP_OPTIONS = {'dist_dir': dist_dir,
|
|||||||
'plist': {
|
'plist': {
|
||||||
'CFBundleName': APPLONGNAME,
|
'CFBundleName': APPLONGNAME,
|
||||||
'CFBundleIdentifier': 'uk.org.marginal.%s' % APPNAME.lower(),
|
'CFBundleIdentifier': 'uk.org.marginal.%s' % APPNAME.lower(),
|
||||||
|
'CFBundleLocalizations': [x[:-len('.lproj')] for x in os.listdir('/Library/Frameworks/Sparkle.framework/Resources') if x.endswith('.lproj')], # https://github.com/sparkle-project/Sparkle/issues/238
|
||||||
'CFBundleShortVersionString': VERSION,
|
'CFBundleShortVersionString': VERSION,
|
||||||
'CFBundleVersion': VERSION,
|
'CFBundleVersion': VERSION,
|
||||||
'LSMinimumSystemVersion': '.'.join(platform.mac_ver()[0].split('.')[:2]), # minimum version = build version
|
'LSMinimumSystemVersion': '10.9',
|
||||||
'NSHumanReadableCopyright': u'© 2015 Jonathan Harris',
|
'NSHumanReadableCopyright': u'© 2015 Jonathan Harris',
|
||||||
'SUEnableAutomaticChecks': True,
|
'SUEnableAutomaticChecks': True,
|
||||||
'SUShowReleaseNotes': True,
|
'SUShowReleaseNotes': True,
|
||||||
@ -74,22 +77,24 @@ PY2APP_OPTIONS = {'dist_dir': dist_dir,
|
|||||||
},
|
},
|
||||||
'graph': True, # output dependency graph in dist
|
'graph': True, # output dependency graph in dist
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
DATA_FILES = []
|
||||||
|
|
||||||
PY2EXE_OPTIONS = {'dist_dir': dist_dir,
|
elif sys.platform=='win32':
|
||||||
|
OPTIONS = { 'py2exe':
|
||||||
|
{'dist_dir': dist_dir,
|
||||||
'optimize': 2,
|
'optimize': 2,
|
||||||
'packages': [ 'requests' ],
|
'packages': [ 'requests' ],
|
||||||
'excludes': [ 'PIL', 'simplejson' ],
|
'excludes': [ 'PIL', 'simplejson' ],
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if sys.platform=='win32':
|
|
||||||
import requests
|
import requests
|
||||||
DATA_FILES = [ ('', [requests.certs.where(),
|
DATA_FILES = [ ('', [requests.certs.where(),
|
||||||
'WinSparkle.dll',
|
'WinSparkle.dll',
|
||||||
'WinSparkle.pdb', # For debugging - don't include in package
|
'WinSparkle.pdb', # For debugging - don't include in package
|
||||||
'%s.VisualElementsManifest.xml' % APPNAME,
|
'%s.VisualElementsManifest.xml' % APPNAME,
|
||||||
'%s.ico' % APPNAME ] ) ]
|
'%s.ico' % APPNAME ] ) ]
|
||||||
else:
|
|
||||||
DATA_FILES = [ ]
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name = APPLONGNAME,
|
name = APPLONGNAME,
|
||||||
@ -104,8 +109,7 @@ setup(
|
|||||||
'other_resources': [(24, 1, open(APPNAME+'.manifest').read())],
|
'other_resources': [(24, 1, open(APPNAME+'.manifest').read())],
|
||||||
} ],
|
} ],
|
||||||
data_files = DATA_FILES,
|
data_files = DATA_FILES,
|
||||||
options = { 'py2app': PY2APP_OPTIONS,
|
options = OPTIONS,
|
||||||
'py2exe': PY2EXE_OPTIONS },
|
|
||||||
setup_requires = [sys.platform=='darwin' and 'py2app' or 'py2exe'],
|
setup_requires = [sys.platform=='darwin' and 'py2app' or 'py2exe'],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user