about summary refs log tree commit diff
path: root/kcc.py
diff options
context:
space:
mode:
authorPaweł Jastrzębski <pawelj@vulturis.eu>2014-04-30 20:38:23 +0200
committerPaweł Jastrzębski <pawelj@vulturis.eu>2014-04-30 20:38:23 +0200
commitdf5ee1badf68c1d9f65454d01eebc8002ba5d8d6 (patch)
tree944685b9ef63b69adfa30fb9075da7a78f427956 /kcc.py
parentRe-enabled tray icon on Linux (diff)
downloadkcc-df5ee1badf68c1d9f65454d01eebc8002ba5d8d6.tar.gz
kcc-df5ee1badf68c1d9f65454d01eebc8002ba5d8d6.tar.bz2
kcc-df5ee1badf68c1d9f65454d01eebc8002ba5d8d6.zip
Overhauled dependency check
Diffstat (limited to 'kcc.py')
-rwxr-xr-xkcc.py26
1 files changed, 15 insertions, 11 deletions
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