diff options
author | Paweł Jastrzębski <pawelj@vulturis.eu> | 2013-03-08 17:55:26 +0100 |
---|---|---|
committer | Paweł Jastrzębski <pawelj@vulturis.eu> | 2013-03-08 17:55:26 +0100 |
commit | 0fd3f6bc0f60549af57423c5ce191fac14a91bc9 (patch) | |
tree | 61f5832a49a8404f39eae3c4e350006765abfe12 /setup.py | |
parent | Improved setup_console.py (diff) | |
download | kcc-0fd3f6bc0f60549af57423c5ce191fac14a91bc9.tar.gz kcc-0fd3f6bc0f60549af57423c5ce191fac14a91bc9.tar.bz2 kcc-0fd3f6bc0f60549af57423c5ce191fac14a91bc9.zip |
setup.py py2exe/app -> cx_freeze
Not tested on OS X.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 95 |
1 files changed, 23 insertions, 72 deletions
diff --git a/setup.py b/setup.py index 5e8af6e..8106f72 100644 --- a/setup.py +++ b/setup.py @@ -1,88 +1,39 @@ """ -py2app/py2exe build script for KCC. +cx_freeze build script for KCC. -Will automatically ensure that all build prerequisites are available -via ez_setup +Will automatically ensure that all build prerequisites are available via ez_setup -Usage (Mac OS X): - python setup.py py2app - -Usage (Windows): +Usage (Windows/Mac OS X): python setup.py build """ from ez_setup import use_setuptools use_setuptools() import sys -from setuptools import setup +from cx_Freeze import setup, Executable -NAME = 'KindleComicConverter' +NAME = "KindleComicConverter" VERSION = "2.7" -mainscript = 'kcc.py' +MAIN = "kcc.py" -if sys.platform == 'darwin': - extra_options = dict( - setup_requires=['py2app'], - app=[mainscript], - options=dict( - py2app=dict( - argv_emulation=True, - iconfile='comic2ebook.icns', - plist=dict( - CFBundleName=NAME, - CFBundleShortVersionString=VERSION, - CFBundleGetInfoString=NAME + " " + VERSION + ", written 2012-2013 by Ciro Mattia Gonano", - CFBundleExecutable=NAME, - CFBundleIdentifier='com.github.ciromattia.kcc', - CFBundleSignature='dplt' - ) - ) - ) - ) -elif sys.platform == 'win32': - from cx_Freeze import setup, Executable +if sys.platform == "darwin": + icon = "comic2ebook.icns" + base = None + buildEXEOptions = {} +elif sys.platform == "win32": + icon = "comic2ebook.ico" base = "Win32GUI" - extra_options = dict( - executables=[Executable("kcc.py", base=base, icon='comic2ebook.ico', - appendScriptToExe=True, appendScriptToLibrary=False)], - options=dict( - build_exe=dict( - compressed=True - ) - ) - ) -else: - extra_options = dict( - # Normally unix-like platforms will use "setup.py install" - # and install the main script as such - scripts=[mainscript], - ) + buildEXEOptions = {"include_files": ["comic2ebook.ico"]} setup( - name=NAME, - version=VERSION, - author="Ciro Mattia Gonano", - author_email="ciromattia@gmail.com", - description="A tool to convert comics (CBR/CBZ/PDFs/image folders) to Mobipocket.", - license="ISC License (ISCL)", - keywords="kindle comic mobipocket mobi cbz cbr manga", - url="http://github.com/ciromattia/kcc", - classifiers=[ - 'Development Status :: 4 - Beta' - 'License :: OSI Approved :: ISC License (ISCL)', - 'Environment :: Console', - 'Environment :: MacOS X', - 'Environment :: Win32 (MS Windows)', - 'Environment :: X11 Applications', - 'Intended Audience :: End Users/Desktop', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', - 'Topic :: Multimedia :: Graphics :: Graphics Conversion', - 'Topic :: Utilities' - ], - packages=['kcc'], - # make sure to add custom_fixers to the MANIFEST.in - include_package_data=True, - **extra_options + name = NAME, + version = VERSION, + author = "Ciro Mattia Gonano", + author_email = "ciromattia@gmail.com", + description = "A tool to convert comics (CBR/CBZ/PDFs/image folders) to MOBI.", + license = "ISC License (ISCL)", + keywords = "kindle comic mobipocket mobi cbz cbr manga", + url = "http://github.com/ciromattia/kcc", + options = {"build_exe": buildEXEOptions}, + executables = [Executable(MAIN, base=base, icon=icon, appendScriptToExe=True, appendScriptToLibrary=False, compress=True)] ) |