diff options
author | Paweł Jastrzębski <pawelj@iosphe.re> | 2017-01-20 09:44:21 +0100 |
---|---|---|
committer | Paweł Jastrzębski <pawelj@iosphe.re> | 2017-01-20 09:44:21 +0100 |
commit | 45c1afcad4bff454f99d10e177ee862589bdc3e6 (patch) | |
tree | 6d9290cc35a0f60d36d4c587c45369fc4cfc0d6f /setup.py | |
parent | Improved processing of credit pages (diff) | |
download | kcc-45c1afcad4bff454f99d10e177ee862589bdc3e6.tar.gz kcc-45c1afcad4bff454f99d10e177ee862589bdc3e6.tar.bz2 kcc-45c1afcad4bff454f99d10e177ee862589bdc3e6.zip |
Update build environment
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/setup.py b/setup.py index a1f1b73..827edc8 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ import shutil import setuptools import distutils.cmd from distutils.command.build import build -from kcc import __version__ +from kindlecomicconverter import __version__ NAME = 'KindleComicConverter' MAIN = 'kcc.py' @@ -38,7 +38,10 @@ class BuildBinaryCommand(distutils.cmd.Command): def run(self): if sys.platform == 'darwin': - os.system('pyinstaller -y -F -i icons/comic2ebook.icns -n "Kindle Comic Converter" -w -s --noupx kcc.py') + if os.path.isfile('KCC.spec'): + os.system('pyinstaller KCC.spec') + else: + os.system('pyinstaller -y -F -i icons/comic2ebook.icns -n "Kindle Comic Converter" -w -s --noupx kcc.py') shutil.copy('other/osx/7za', 'dist/Kindle Comic Converter.app/Contents/Resources') shutil.copy('other/osx/unrar', 'dist/Kindle Comic Converter.app/Contents/Resources') shutil.copy('other/osx/Info.plist', 'dist/Kindle Comic Converter.app/Contents') @@ -51,7 +54,10 @@ class BuildBinaryCommand(distutils.cmd.Command): os.system('appdmg kcc.json dist/KindleComicConverter_osx_' + VERSION + '.dmg') exit(0) elif sys.platform == 'win32': - os.system('pyinstaller -y -F -i icons\comic2ebook.ico -n KCC -w --noupx kcc.py') + if os.path.isfile('KCC.spec'): + os.system('pyinstaller KCC.spec') + else: + os.system('pyinstaller -y -F -i icons\comic2ebook.ico -n KCC -w --noupx kcc.py') if os.path.isfile('setup.bat'): os.system('setup.bat') exit(0) @@ -59,19 +65,19 @@ class BuildBinaryCommand(distutils.cmd.Command): if self.pyz: script = ''' cp kcc.py __main__.py - zip kcc.zip __main__.py kcc/*.py + zip kcc.zip __main__.py kindlecomicconverter/*.py echo "#!/usr/bin/env python3" > kcc-bin cat kcc.zip >> kcc-bin chmod +x kcc-bin cp kcc-c2e.py __main__.py - zip kcc-c2e.zip __main__.py kcc/*.py + zip kcc-c2e.zip __main__.py kindlecomicconverter/*.py echo "#!/usr/bin/env python3" > kcc-c2e-bin cat kcc-c2e.zip >> kcc-c2e-bin chmod +x kcc-c2e-bin cp kcc-c2p.py __main__.py - zip kcc-c2p.zip __main__.py kcc/*.py + zip kcc-c2p.zip __main__.py kindlecomicconverter/*.py echo "#!/usr/bin/env python3" > kcc-c2p-bin cat kcc-c2p.zip >> kcc-c2p-bin chmod +x kcc-c2p-bin |