1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-12 17:26:23 +00:00

setup.py py2exe/app -> cx_freeze

Not tested on OS X.
This commit is contained in:
Paweł Jastrzębski
2013-03-08 17:55:26 +01:00
parent d76ce6c92f
commit 0fd3f6bc0f
2 changed files with 24 additions and 75 deletions

4
.gitignore vendored
View File

@@ -3,6 +3,4 @@
*.cbr *.cbr
.idea .idea
build build
KindleComicConverter.egg-info awkcc
awkcc
dist

View File

@@ -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 Will automatically ensure that all build prerequisites are available via ez_setup
via ez_setup
Usage (Mac OS X): Usage (Windows/Mac OS X):
python setup.py py2app
Usage (Windows):
python setup.py build python setup.py build
""" """
from ez_setup import use_setuptools from ez_setup import use_setuptools
use_setuptools() use_setuptools()
import sys import sys
from setuptools import setup from cx_Freeze import setup, Executable
NAME = 'KindleComicConverter' NAME = "KindleComicConverter"
VERSION = "2.7" VERSION = "2.7"
mainscript = 'kcc.py' MAIN = "kcc.py"
if sys.platform == 'darwin': if sys.platform == "darwin":
extra_options = dict( icon = "comic2ebook.icns"
setup_requires=['py2app'], base = None
app=[mainscript], buildEXEOptions = {}
options=dict( elif sys.platform == "win32":
py2app=dict( icon = "comic2ebook.ico"
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
base = "Win32GUI" base = "Win32GUI"
extra_options = dict( buildEXEOptions = {"include_files": ["comic2ebook.ico"]}
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],
)
setup( setup(
name=NAME, name = NAME,
version=VERSION, version = VERSION,
author="Ciro Mattia Gonano", author = "Ciro Mattia Gonano",
author_email="ciromattia@gmail.com", author_email = "ciromattia@gmail.com",
description="A tool to convert comics (CBR/CBZ/PDFs/image folders) to Mobipocket.", description = "A tool to convert comics (CBR/CBZ/PDFs/image folders) to MOBI.",
license="ISC License (ISCL)", license = "ISC License (ISCL)",
keywords="kindle comic mobipocket mobi cbz cbr manga", keywords = "kindle comic mobipocket mobi cbz cbr manga",
url="http://github.com/ciromattia/kcc", url = "http://github.com/ciromattia/kcc",
classifiers=[ options = {"build_exe": buildEXEOptions},
'Development Status :: 4 - Beta' executables = [Executable(MAIN, base=base, icon=icon, appendScriptToExe=True, appendScriptToLibrary=False, compress=True)]
'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
) )