mirror of
https://github.com/clearml/clearml-agent
synced 2025-03-14 07:28:53 +00:00
Add support for "-e ./folder" lines in requirements
This commit is contained in:
parent
7a11c7c165
commit
2d91d4cde6
@ -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):
|
||||||
"""
|
"""
|
||||||
|
@ -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:
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user