about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rwxr-xr-xkcc-c2e.py20
-rwxr-xr-xkcc-c2p.py6
-rwxr-xr-xkcc.py26
4 files changed, 30 insertions, 24 deletions
diff --git a/README.md b/README.md
index 4e7b07a..8d9c562 100644
--- a/README.md
+++ b/README.md
@@ -41,7 +41,7 @@ You can find the latest released binary at the following links:
 
 ### For running from source:
 - Python 3.3+
-- [PyQt5](http://www.riverbankcomputing.co.uk/software/pyqt/download5) 5.2.0+
+- [PyQt5](http://www.riverbankcomputing.co.uk/software/pyqt/download5) 5.2.1+
 - [Pillow](http://pypi.python.org/pypi/Pillow/) 2.3.0+
 - [psutil](https://pypi.python.org/pypi/psutil) 2.0+
 - [python-slugify](http://pypi.python.org/pypi/python-slugify)
diff --git a/kcc-c2e.py b/kcc-c2e.py
index 3288560..9957fc7 100755
--- a/kcc-c2e.py
+++ b/kcc-c2e.py
@@ -28,25 +28,27 @@ if sys.version_info[0] != 3:
     print('ERROR: This is Python 3 script!')
     exit(1)
 
-# Dependiences check
+# Dependency check
 missing = []
 try:
     # noinspection PyUnresolvedReferences
-    from psutil import virtual_memory, Popen
+    import psutil
+    if tuple(map(int, ('2.0.0'.split(".")))) > tuple(map(int, psutil.version_info)):
+        missing.append('psutil 2.0.0+')
 except ImportError:
-    missing.append('psutil')
+    missing.append('psutil 2.0.0+')
 try:
     # noinspection PyUnresolvedReferences
-    from slugify import slugify
+    import PIL
+    if tuple(map(int, ('2.3.0'.split(".")))) > tuple(map(int, (PIL.PILLOW_VERSION.split(".")))):
+        missing.append('Pillow 2.3.0+')
 except ImportError:
-    missing.append('python-slugify')
+    missing.append('Pillow 2.3.0+')
 try:
     # noinspection PyUnresolvedReferences
-    from PIL import Image, ImageOps, ImageStat, ImageChops
-    if tuple(map(int, ('2.3.0'.split(".")))) > tuple(map(int, (Image.PILLOW_VERSION.split(".")))):
-        missing.append('Pillow 2.3.0+')
+    import slugify
 except ImportError:
-    missing.append('Pillow 2.3.0+')
+    missing.append('python-slugify')
 if len(missing) > 0:
     try:
         # noinspection PyUnresolvedReferences
diff --git a/kcc-c2p.py b/kcc-c2p.py
index 482db23..853332e 100755
--- a/kcc-c2p.py
+++ b/kcc-c2p.py
@@ -28,12 +28,12 @@ if sys.version_info[0] != 3:
     print('ERROR: This is Python 3 script!')
     exit(1)
 
-# Dependiences check
+# Dependency check
 missing = []
 try:
     # noinspection PyUnresolvedReferences
-    from PIL import Image, ImageOps, ImageStat, ImageChops
-    if tuple(map(int, ('2.3.0'.split(".")))) > tuple(map(int, (Image.PILLOW_VERSION.split(".")))):
+    import PIL
+    if tuple(map(int, ('2.3.0'.split(".")))) > tuple(map(int, (PIL.PILLOW_VERSION.split(".")))):
         missing.append('Pillow 2.3.0+')
 except ImportError:
     missing.append('Pillow 2.3.0+')
diff --git a/kcc.py b/kcc.py
index a41d3c5..61cdc70 100755
--- a/kcc.py
+++ b/kcc.py
@@ -28,30 +28,34 @@ if sys.version_info[0] != 3:
     print('ERROR: This is Python 3 script!')
     exit(1)
 
-# Dependiences check
+# Dependency check
 missing = []
 try:
     # noinspection PyUnresolvedReferences
-    from PyQt5 import QtCore, QtGui, QtNetwork, QtWidgets
+    from PyQt5 import QtCore, QtNetwork, QtWidgets
+    if tuple(map(int, ('5.2.1'.split(".")))) > tuple(map(int, (QtCore.qVersion().split(".")))):
+        missing.append('PyQt5 5.2.1+')
 except ImportError:
-    missing.append('PyQt5')
+    missing.append('PyQt5 5.2.1+')
 try:
     # noinspection PyUnresolvedReferences
-    from psutil import virtual_memory, Popen
+    import psutil
+    if tuple(map(int, ('2.0.0'.split(".")))) > tuple(map(int, psutil.version_info)):
+        missing.append('psutil 2.0.0+')
 except ImportError:
-    missing.append('psutil')
+    missing.append('psutil 2.0.0+')
 try:
     # noinspection PyUnresolvedReferences
-    from slugify import slugify
+    import PIL
+    if tuple(map(int, ('2.3.0'.split(".")))) > tuple(map(int, (PIL.PILLOW_VERSION.split(".")))):
+        missing.append('Pillow 2.3.0+')
 except ImportError:
-    missing.append('python-slugify')
+    missing.append('Pillow 2.3.0+')
 try:
     # noinspection PyUnresolvedReferences
-    from PIL import Image, ImageOps, ImageStat, ImageChops
-    if tuple(map(int, ('2.3.0'.split(".")))) > tuple(map(int, (Image.PILLOW_VERSION.split(".")))):
-        missing.append('Pillow 2.3.0+')
+    import slugify
 except ImportError:
-    missing.append('Pillow 2.3.0+')
+    missing.append('python-slugify')
 if len(missing) > 0:
     try:
         # noinspection PyUnresolvedReferences