about summary refs log tree commit diff
path: root/setup.py
diff options
context:
space:
mode:
authorPaweł Jastrzębski <pawelj@vulturis.eu>2013-06-12 09:28:50 +0200
committerPaweł Jastrzębski <pawelj@vulturis.eu>2013-06-12 09:28:50 +0200
commit047a585cc29118c034622c0b3e57d38e821c874f (patch)
tree84a3777e34275334774d5cb99c5fef25047da3f9 /setup.py
parentIcons .ico -> .png (diff)
downloadkcc-047a585cc29118c034622c0b3e57d38e821c874f.tar.gz
kcc-047a585cc29118c034622c0b3e57d38e821c874f.tar.bz2
kcc-047a585cc29118c034622c0b3e57d38e821c874f.zip
cx_Freeze support
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py62
1 files changed, 62 insertions, 0 deletions
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..2621895
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,62 @@
+"""
+cx_Freeze build script for KCC.
+
+Will automatically ensure that all build prerequisites are available via ez_setup
+
+Usage (Mac OS X):
+    python setup.py bdist_mac
+
+Usage (Windows):
+    python setup.py build
+"""
+from sys import platform
+from ez_setup import use_setuptools
+use_setuptools()
+from cx_Freeze import setup, Executable
+
+NAME = "KindleComicConverter"
+VERSION = "3.0"
+MAIN = "kcc.py"
+
+includefiles = ['LICENSE.txt']
+includes = []
+excludes = []
+
+if platform == "darwin":
+    extra_options = dict(
+        options={"build_exe": {"include_files": includefiles, "excludes": excludes, "compressed": True},
+                 "bdist_mac": {"iconfile": "icons/comic2ebook.icns"}},
+        executables=[Executable(MAIN,
+                                copyDependentFiles=True,
+                                appendScriptToExe=True,
+                                appendScriptToLibrary=False,
+                                compress=True)])
+elif platform == "win32":
+    base = "Win32GUI"
+    extra_options = dict(
+        options={"build_exe": {"include_files": includefiles, "excludes": excludes, "compressed": True}},
+        executables=[Executable(MAIN,
+                                base=base,
+                                targetName="KCC.exe",
+                                icon="icons/comic2ebook.ico",
+                                copyDependentFiles=True,
+                                appendScriptToExe=True,
+                                appendScriptToLibrary=False,
+                                compress=True)])
+else:
+    extra_options = dict(
+        scripts=[MAIN],
+    )
+
+setup(
+    name=NAME,
+    version=VERSION,
+    author="Ciro Mattia Gonano, Pawel Jastrzebski",
+    author_email="ciromattia@gmail.com, pawelj@vulturis.eu",
+    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",
+    packages=['KCC'], requires=['PIL', 'cx_Freeze'],
+    **extra_options
+)
\ No newline at end of file