Require semver in main requirements.txt
Remove optional checks from repository.py Change-Id: I038f123fec8f41f7fdea254e87e93e66a5cb9180
This commit is contained in:
parent
8d4d3761d7
commit
3ca2c3bb54
@ -30,4 +30,4 @@ peewee
|
||||
|
||||
|
||||
# if you want to use complex version check in repositories
|
||||
# semver
|
||||
semver
|
||||
|
@ -17,17 +17,11 @@ from collections import defaultdict
|
||||
|
||||
import errno
|
||||
import os
|
||||
import semver
|
||||
import shutil
|
||||
|
||||
from solar import utils
|
||||
|
||||
try:
|
||||
import semver
|
||||
except ImportError:
|
||||
_semver = False
|
||||
else:
|
||||
_semver = True
|
||||
|
||||
|
||||
class RepositoryException(Exception):
|
||||
pass
|
||||
@ -75,9 +69,6 @@ class Repository(object):
|
||||
if os.path.exists(os.path.join(single_path, 'meta.yaml')):
|
||||
yield pth, single_path
|
||||
else:
|
||||
if not _semver:
|
||||
raise RepositoryException("You need semver support "
|
||||
"for complex version matching")
|
||||
if not os.path.isdir(single_path):
|
||||
continue
|
||||
for single in os.listdir(single_path):
|
||||
@ -211,9 +202,6 @@ class Repository(object):
|
||||
resource_name = spec['resource_name']
|
||||
if version_sign == '==':
|
||||
return os.path.join(self.fpath, spec['resource_name'], version)
|
||||
if not _semver:
|
||||
raise RepositoryException("You need semver support "
|
||||
"for complex version matching")
|
||||
found = self.iter_contents(resource_name)
|
||||
if version is None:
|
||||
sc = semver.compare
|
||||
|
@ -14,6 +14,3 @@ os-testr
|
||||
# to test if everything works on gevent
|
||||
gevent
|
||||
|
||||
|
||||
# semver for version tests
|
||||
semver
|
||||
|
Loading…
Reference in New Issue
Block a user