aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/installer.py
diff options
context:
space:
mode:
authorBenoit Pierre <benoit.pierre@gmail.com>2019-11-26 20:56:57 +0100
committerBenoit Pierre <benoit.pierre@gmail.com>2019-11-27 19:15:34 +0100
commit7502dc9ca767927db9599f93cd48851ca59f7a62 (patch)
tree55b1fb2031ef2265dcb4eba68101a3179afe5a24 /setuptools/installer.py
parente84f616a6507ec9115fad68b221cbf5333d9d2d9 (diff)
downloadexternal_python_setuptools-7502dc9ca767927db9599f93cd48851ca59f7a62.tar.gz
external_python_setuptools-7502dc9ca767927db9599f93cd48851ca59f7a62.tar.bz2
external_python_setuptools-7502dc9ca767927db9599f93cd48851ca59f7a62.zip
fix possible issue with transitive build dependencies
Handle the case where a missing transitive build dependency is required by an extra for an already installed build dependency.
Diffstat (limited to 'setuptools/installer.py')
-rw-r--r--setuptools/installer.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/setuptools/installer.py b/setuptools/installer.py
index 35bc3cc5..ba9cfce9 100644
--- a/setuptools/installer.py
+++ b/setuptools/installer.py
@@ -64,8 +64,11 @@ def fetch_build_egg(dist, req):
pkg_resources.get_distribution('wheel')
except pkg_resources.DistributionNotFound:
dist.announce('WARNING: The wheel package is not available.', log.WARN)
- if not isinstance(req, pkg_resources.Requirement):
- req = pkg_resources.Requirement.parse(req)
+ # Ignore environment markers: if we're here, it's needed. This ensure
+ # we don't try to ask pip for something like `babel; extra == "i18n"`,
+ # which would always be ignored.
+ req = pkg_resources.Requirement.parse(str(req))
+ req.marker = None
# Take easy_install options into account, but do not override relevant
# pip environment variables (like PIP_INDEX_URL or PIP_QUIET); they'll
# take precedence.