2017-09-07 17:37:03 +00:00
|
|
|
"""
|
|
|
|
This is a setup.py script generated by py2applet
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
python setup.py py2app
|
|
|
|
"""
|
|
|
|
|
2017-10-04 13:03:06 +00:00
|
|
|
from setuptools import setup, Command
|
2017-09-07 17:37:03 +00:00
|
|
|
from glob import glob
|
2017-10-04 13:03:06 +00:00
|
|
|
import shutil
|
2017-09-07 17:37:03 +00:00
|
|
|
import syncplay
|
|
|
|
|
2017-10-04 13:03:06 +00:00
|
|
|
cmdlist = {}
|
|
|
|
|
2017-09-07 17:37:03 +00:00
|
|
|
APP = ['syncplayClient.py']
|
|
|
|
DATA_FILES = [
|
2017-10-02 13:14:13 +00:00
|
|
|
('resources', glob('resources/*.png') + glob('resources/*.rtf')),
|
2017-09-07 17:37:03 +00:00
|
|
|
]
|
|
|
|
OPTIONS = {
|
|
|
|
'iconfile':'resources/icon.icns',
|
2017-10-04 13:03:06 +00:00
|
|
|
'includes': {'PySide.QtCore', 'PySide.QtUiTools', 'PySide.QtGui'},
|
2017-10-04 13:38:24 +00:00
|
|
|
'plist': {
|
2017-09-07 17:37:03 +00:00
|
|
|
'CFBundleName':'Syncplay',
|
|
|
|
'CFBundleShortVersionString':syncplay.version,
|
|
|
|
'CFBundleIdentifier':'pl.syncplay.Syncplay',
|
|
|
|
'NSHumanReadableCopyright': '@ 2017 Syncplay All Rights Reserved'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-04 13:03:06 +00:00
|
|
|
class Fix(Command):
|
|
|
|
user_options = []
|
|
|
|
|
|
|
|
def initialize_options(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def finalize_options(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def trim_packages(self):
|
|
|
|
"""Remove big files in external dependencies that Syncplay doesn't need"""
|
|
|
|
|
|
|
|
shutil.rmtree('dist/Syncplay.app/Contents/Frameworks/QtDesigner.framework', ignore_errors=True)
|
|
|
|
shutil.rmtree('dist/Syncplay.app/Contents/Frameworks/QtScript.framework', ignore_errors=True)
|
|
|
|
shutil.rmtree('dist/Syncplay.app/Contents/Frameworks/QtXml.framework', ignore_errors=True)
|
|
|
|
|
|
|
|
def run(self):
|
|
|
|
self.trim_packages()
|
|
|
|
|
|
|
|
cmdlist['fix'] = Fix
|
|
|
|
|
2017-09-07 17:37:03 +00:00
|
|
|
setup(
|
|
|
|
app=APP,
|
|
|
|
name='Syncplay',
|
|
|
|
data_files=DATA_FILES,
|
|
|
|
options={'py2app': OPTIONS},
|
|
|
|
setup_requires=['py2app'],
|
2017-10-04 13:03:06 +00:00
|
|
|
cmdclass=cmdlist
|
2017-09-07 17:37:03 +00:00
|
|
|
)
|