diff options
-rwxr-xr-x | kcc-c2e.py | 5 | ||||
-rwxr-xr-x | kcc-c2p.py | 5 | ||||
-rwxr-xr-x | kcc.py | 5 | ||||
-rw-r--r-- | kcc/KCC_gui.py | 6 | ||||
-rw-r--r-- | kcc/cbxarchive.py | 4 | ||||
-rwxr-xr-x | kcc/comic2ebook.py | 6 | ||||
-rw-r--r-- | kcc/comic2panel.py | 5 | ||||
-rwxr-xr-x | kcc/image.py | 6 | ||||
-rw-r--r-- | kcc/pdfjpgextract.py | 4 | ||||
-rw-r--r-- | kcc/shared.py | 13 | ||||
-rwxr-xr-x | setup.py | 18 | ||||
-rwxr-xr-x | setup.sh | 2 |
12 files changed, 11 insertions, 68 deletions
diff --git a/kcc-c2e.py b/kcc-c2e.py index 97a4fa6..5025745 100755 --- a/kcc-c2e.py +++ b/kcc-c2e.py @@ -18,11 +18,6 @@ # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -__version__ = '4.4.1' -__license__ = 'ISC' -__copyright__ = '2012-2015, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>' -__docformat__ = 'restructuredtext en' - import sys if sys.version_info[0] != 3: print('ERROR: This is Python 3 script!') diff --git a/kcc-c2p.py b/kcc-c2p.py index 451ce9f..64477e3 100755 --- a/kcc-c2p.py +++ b/kcc-c2p.py @@ -18,11 +18,6 @@ # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -__version__ = '4.4.1' -__license__ = 'ISC' -__copyright__ = '2012-2015, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>' -__docformat__ = 'restructuredtext en' - import sys if sys.version_info[0] != 3: print('ERROR: This is Python 3 script!') diff --git a/kcc.py b/kcc.py index 589fedf..f9ca259 100755 --- a/kcc.py +++ b/kcc.py @@ -18,11 +18,6 @@ # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -__version__ = '4.4.1' -__license__ = 'ISC' -__copyright__ = '2012-2015, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>' -__docformat__ = 'restructuredtext en' - import sys if sys.version_info[0] != 3: print('ERROR: This is Python 3 script!') diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py index b608e42..b962b04 100644 --- a/kcc/KCC_gui.py +++ b/kcc/KCC_gui.py @@ -17,11 +17,6 @@ # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -__version__ = '4.4.1' -__license__ = 'ISC' -__copyright__ = '2012-2015, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>' -__docformat__ = 'restructuredtext en' - import os import sys from urllib.parse import unquote @@ -41,6 +36,7 @@ from distutils.version import StrictVersion from .shared import md5Checksum, HTMLStripper from . import comic2ebook from . import KCC_rc_web +from . import __version__ if sys.platform.startswith('darwin'): from . import KCC_ui_osx as KCC_ui elif sys.platform.startswith('linux'): diff --git a/kcc/cbxarchive.py b/kcc/cbxarchive.py index cdca253..a533a05 100644 --- a/kcc/cbxarchive.py +++ b/kcc/cbxarchive.py @@ -16,10 +16,6 @@ # PERFORMANCE OF THIS SOFTWARE. # -__license__ = 'ISC' -__copyright__ = '2012-2015, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>' -__docformat__ = 'restructuredtext en' - import sys import os from zipfile import is_zipfile, ZipFile diff --git a/kcc/comic2ebook.py b/kcc/comic2ebook.py index 0de5f71..8d76a31 100755 --- a/kcc/comic2ebook.py +++ b/kcc/comic2ebook.py @@ -18,11 +18,6 @@ # PERFORMANCE OF THIS SOFTWARE. # -__version__ = '4.4.1' -__license__ = 'ISC' -__copyright__ = '2012-2015, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>' -__docformat__ = 'restructuredtext en' - import os import sys from copy import copy @@ -52,6 +47,7 @@ from . import image from . import cbxarchive from . import pdfjpgextract from . import dualmetafix +from . import __version__ def main(argv=None): diff --git a/kcc/comic2panel.py b/kcc/comic2panel.py index 277f4c7..1a766ac 100644 --- a/kcc/comic2panel.py +++ b/kcc/comic2panel.py @@ -18,11 +18,6 @@ # PERFORMANCE OF THIS SOFTWARE. # -__version__ = '4.4.1' -__license__ = 'ISC' -__copyright__ = '2012-2015, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>' -__docformat__ = 'restructuredtext en' - import os import sys from shutil import rmtree, copytree, move diff --git a/kcc/image.py b/kcc/image.py index 618b9ff..2523c06 100755 --- a/kcc/image.py +++ b/kcc/image.py @@ -16,11 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -__version__ = '4.4.1' -__license__ = 'ISC' -__copyright__ = '2012-2015, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>' -__docformat__ = 'restructuredtext en' - import os from io import BytesIO from urllib.request import Request, urlopen @@ -28,6 +23,7 @@ from urllib.parse import quote from functools import reduce from PIL import Image, ImageOps, ImageStat, ImageChops from .shared import md5Checksum +from . import __version__ class ProfileData: diff --git a/kcc/pdfjpgextract.py b/kcc/pdfjpgextract.py index 7ebae06..a4c0203 100644 --- a/kcc/pdfjpgextract.py +++ b/kcc/pdfjpgextract.py @@ -19,10 +19,6 @@ # PERFORMANCE OF THIS SOFTWARE. # -__license__ = 'ISC' -__copyright__ = '2012-2015, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>' -__docformat__ = 'restructuredtext en' - import os from random import choice from string import ascii_uppercase, digits diff --git a/kcc/shared.py b/kcc/shared.py index 5a6602b..e9555e5 100644 --- a/kcc/shared.py +++ b/kcc/shared.py @@ -16,10 +16,6 @@ # PERFORMANCE OF THIS SOFTWARE. # -__license__ = 'ISC' -__copyright__ = '2012-2015, Ciro Mattia Gonano <ciromattia@gmail.com>, Pawel Jastrzebski <pawelj@iosphe.re>' -__docformat__ = 'restructuredtext en' - import os from hashlib import md5 from html.parser import HTMLParser @@ -107,12 +103,5 @@ def dependencyCheck(level): except ImportError: missing.append('Pillow 2.7.0+') if len(missing) > 0: - try: - import tkinter - import tkinter.messagebox - importRoot = tkinter.Tk() - importRoot.withdraw() - tkinter.messagebox.showerror('KCC - Error', 'ERROR: ' + ', '.join(missing) + ' is not installed!') - except ImportError: - print('ERROR: ' + ', '.join(missing) + ' is not installed!') + print('ERROR: ' + ', '.join(missing) + ' is not installed!') exit(1) \ No newline at end of file diff --git a/setup.py b/setup.py index 2621bd0..35afa85 100755 --- a/setup.py +++ b/setup.py @@ -9,12 +9,13 @@ Usage (Mac OS X): python setup.py py2app """ from sys import platform, version_info +from kcc import __version__ if version_info[0] != 3: print('ERROR: This is Python 3 script!') exit(1) NAME = "KindleComicConverter" -VERSION = "4.4.1" +VERSION = __version__ MAIN = "kcc.py" if platform == "darwin": @@ -54,24 +55,17 @@ if platform == "darwin": elif platform == "win32": # noinspection PyUnresolvedReferences import py2exe - import platform as arch from distutils.core import setup - if arch.architecture()[0] == '64bit': - suffix = '_64' - else: - suffix = '' - additional_files = [('platforms', ['C:\Python34' + suffix + - '\Lib\site-packages\PyQt5\plugins\platforms\qwindows.dll']), + additional_files = [('platforms', ['C:\Python34\Lib\site-packages\PyQt5\plugins\platforms\qwindows.dll']), ('', ['LICENSE.txt', 'other\\7za.exe', 'other\\UnRAR.exe', 'other\\Additional-LICENSE.txt', - 'C:\Python34' + suffix + '\Lib\site-packages\PyQt5\libGLESv2.dll', - 'C:\Python34' + suffix + '\Lib\site-packages\PyQt5\libEGL.dll'])] + 'C:\Python34\Lib\site-packages\PyQt5\libGLESv2.dll', + 'C:\Python34\Lib\site-packages\PyQt5\libEGL.dll'])] extra_options = dict( options={'py2exe': {"bundle_files": 1, - "dll_excludes": ["tcl85.dll", "tk85.dll"], - "dist_dir": "dist" + suffix, + "dist_dir": "dist", "compressed": True, "includes": ["sip"], "excludes": ["tkinter"], diff --git a/setup.sh b/setup.sh index fa4d85d..ccabf2e 100755 --- a/setup.sh +++ b/setup.sh @@ -21,5 +21,5 @@ echo "#!/usr/bin/env python3" > kcc-c2p-bin cat kcc-c2p.zip >> kcc-c2p-bin chmod +x kcc-c2p-bin -tar --xform s:^.*/:: --xform s/kcc-bin/kcc/ --xform s/kcc-c2p-bin/kcc-c2p/ --xform s/kcc-c2e-bin/kcc-c2e/ --xform s/comic2ebook/kcc/ -czf KindleComicConverter_linux_$VERSION.tar.gz kcc-bin kcc-c2e-bin kcc-c2p-bin LICENSE.txt icons/comic2ebook.png +tar --xform s:^.*/:: --xform s/kcc-bin/kcc/ --xform s/kcc-c2p-bin/kcc-c2p/ --xform s/kcc-c2e-bin/kcc-c2e/ --xform s/comic2ebook/kcc/ -czf KindleComicConverter_linux_${VERSION}.tar.gz kcc-bin kcc-c2e-bin kcc-c2p-bin LICENSE.txt icons/comic2ebook.png rm __main__.py kcc.zip kcc-c2e.zip kcc-c2p.zip kcc-bin kcc-c2e-bin kcc-c2p-bin \ No newline at end of file |