Add support for "-e ./folder" lines in requirements

This commit is contained in:
allegroai 2020-01-14 11:37:41 +02:00
parent 7a11c7c165
commit 2d91d4cde6
3 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ class CythonRequirement(SimpleSubstitution):
def match(self, req): def match(self, req):
# match both Cython & cython # match both Cython & cython
return self.name == req.name.lower() return req.name and self.name == req.name.lower()
def replace(self, req): def replace(self, req):
""" """

View File

@ -14,7 +14,7 @@ class HorovodRequirement(SimpleSubstitution):
def match(self, req): def match(self, req):
# match both horovod # match both horovod
return self.name == req.name.lower() return req.name and self.name == req.name.lower()
def post_install(self): def post_install(self):
if self.post_install_req: if self.post_install_req:

View File

@ -48,7 +48,7 @@ class MarkerRequirement(object):
def tostr(self, markers=True): def tostr(self, markers=True):
if not self.uri: if not self.uri:
parts = [self.name] parts = [self.name or self.line]
if self.extras: if self.extras:
parts.append('[{0}]'.format(','.join(sorted(self.extras)))) parts.append('[{0}]'.format(','.join(sorted(self.extras))))
@ -258,7 +258,7 @@ class RequirementsManager(object):
warning('could not resolve python wheel replacement for {}'.format(req)) warning('could not resolve python wheel replacement for {}'.format(req))
raise raise
except Exception: except Exception:
warning('could not resolve python wheel replacement for {}, ' warning('could not resolve python wheel replacement for \"{}\", '
'using original requirements line: {}'.format(req, i)) 'using original requirements line: {}'.format(req, i))
return None return None