mirror of https://github.com/pypa/pip
Don't cache wheels for links which do not point to release artifacts
This commit is contained in:
parent
28e94c7a2e
commit
fc5746a34c
13
pip/index.py
13
pip/index.py
|
@ -1207,6 +1207,19 @@ class Link(object):
|
|||
def is_wheel(self):
|
||||
return self.ext == wheel_ext
|
||||
|
||||
@property
|
||||
def is_artifact(self):
|
||||
"""
|
||||
Determines if this points to an actual artifact (e.g. a tarball) or if
|
||||
it points to an "abstract" thing like a path or a VCS location.
|
||||
"""
|
||||
from pip.vcs import vcs
|
||||
|
||||
if self.scheme in vcs.all_schemes:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
# An object to represent the "link" for the installed version of a requirement.
|
||||
# Using Inf as the url makes it sort higher.
|
||||
|
|
|
@ -110,6 +110,8 @@ def cached_wheel(cache_dir, link, format_control, package_name):
|
|||
return link
|
||||
if link.is_wheel:
|
||||
return link
|
||||
if not link.is_artifact:
|
||||
return link
|
||||
if not package_name:
|
||||
return link
|
||||
canonical_name = pkg_resources.safe_name(package_name).lower()
|
||||
|
@ -714,6 +716,8 @@ class WheelBuilder(object):
|
|||
logger.info(
|
||||
'Skipping bdist_wheel for %s, due to being editable',
|
||||
req.name)
|
||||
elif autobuilding and not req.link.is_artifact:
|
||||
pass
|
||||
elif autobuilding and not req.source_dir:
|
||||
pass
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue