mirror of
https://github.com/ciromattia/kcc
synced 2026-07-15 17:26:09 +00:00
Updated dependencies
This commit is contained in:
@@ -27,10 +27,6 @@ from tempfile import mkdtemp
|
||||
from zipfile import ZipFile, ZIP_DEFLATED
|
||||
from re import split
|
||||
from traceback import format_tb
|
||||
try:
|
||||
from scandir import walk
|
||||
except ImportError:
|
||||
walk = os.walk
|
||||
|
||||
|
||||
class HTMLStripper(HTMLParser):
|
||||
@@ -71,7 +67,7 @@ def walkLevel(some_dir, level=1):
|
||||
some_dir = some_dir.rstrip(os.path.sep)
|
||||
assert os.path.isdir(some_dir)
|
||||
num_sep = some_dir.count(os.path.sep)
|
||||
for root, dirs, files in walk(some_dir):
|
||||
for root, dirs, files in os.walk(some_dir):
|
||||
dirs, files = walkSort(dirs, files)
|
||||
yield root, dirs, files
|
||||
num_sep_this = root.count(os.path.sep)
|
||||
@@ -164,33 +160,26 @@ def dependencyCheck(level):
|
||||
try:
|
||||
import raven
|
||||
except ImportError:
|
||||
missing.append('raven 5.13.0+')
|
||||
missing.append('raven 6.0.0+')
|
||||
if level > 1:
|
||||
try:
|
||||
from psutil import __version__ as psutilVersion
|
||||
if StrictVersion('4.1.0') > StrictVersion(psutilVersion):
|
||||
missing.append('psutil 4.1.0+')
|
||||
if StrictVersion('5.0.0') > StrictVersion(psutilVersion):
|
||||
missing.append('psutil 5.0.0+')
|
||||
except ImportError:
|
||||
missing.append('psutil 4.1.0+')
|
||||
missing.append('psutil 5.0.0+')
|
||||
try:
|
||||
from slugify import __version__ as slugifyVersion
|
||||
if StrictVersion('1.2.0') > StrictVersion(slugifyVersion):
|
||||
missing.append('python-slugify 1.2.0+')
|
||||
if StrictVersion('1.2.1') > StrictVersion(slugifyVersion):
|
||||
missing.append('python-slugify 1.2.1+')
|
||||
except ImportError:
|
||||
missing.append('python-slugify 1.2.0+')
|
||||
missing.append('python-slugify 1.2.1+')
|
||||
try:
|
||||
from PIL import PILLOW_VERSION as pillowVersion
|
||||
if StrictVersion('3.2.0') > StrictVersion(pillowVersion):
|
||||
missing.append('Pillow 3.2.0+')
|
||||
if StrictVersion('4.0.0') > StrictVersion(pillowVersion):
|
||||
missing.append('Pillow 4.0.0+')
|
||||
except ImportError:
|
||||
missing.append('Pillow 3.2.0+')
|
||||
if version_info[1] < 5:
|
||||
try:
|
||||
from scandir import __version__ as scandirVersion
|
||||
if StrictVersion('1.2') > StrictVersion(scandirVersion):
|
||||
missing.append('scandir 1.2+')
|
||||
except ImportError:
|
||||
missing.append('scandir 1.2+')
|
||||
missing.append('Pillow 4.0.0+')
|
||||
if len(missing) > 0:
|
||||
print('ERROR: ' + ', '.join(missing) + ' is not installed!')
|
||||
exit(1)
|
||||
|
||||
Reference in New Issue
Block a user