1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
"""
cx_Freeze build script for KCC.
Usage (Mac OS X):
python setup.py bdist_mac
Usage (Windows):
python setup.py build
"""
from sys import platform
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(
options={"build_exe": {"include_files": includefiles, "excludes": excludes, "compressed": True}},
executables=[Executable(MAIN,
icon="icons/comic2ebook.png",
copyDependentFiles=True,
appendScriptToExe=True,
appendScriptToLibrary=False,
compress=True)])
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=['Pillow'],
**extra_options
)
|