aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-03-17 10:30:34 -0400
committerJason R. Coombs <jaraco@jaraco.com>2018-03-17 10:30:34 -0400
commitcb9b87935598054da655f7367596d65364e576a3 (patch)
tree4c5cf3661a613e3b636708997a71cc3fbcacd6ca
parentd8170d79a1059b6c58e1b54d94c6600f85354bf6 (diff)
parent025690980c3540dc170abec3a3b18fd11f8b15bc (diff)
downloadexternal_python_setuptools-cb9b87935598054da655f7367596d65364e576a3.tar.gz
external_python_setuptools-cb9b87935598054da655f7367596d65364e576a3.tar.bz2
external_python_setuptools-cb9b87935598054da655f7367596d65364e576a3.zip
Merge branch 'master' into HEAD
-rw-r--r--CHANGES.rst6
-rwxr-xr-xsetup.cfg2
-rwxr-xr-xsetup.py2
-rw-r--r--setuptools/dist.py4
-rw-r--r--setuptools/tests/test_egg_info.py17
5 files changed, 28 insertions, 3 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 7c3a46c6..01fb448c 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,9 @@
+v38.6.1
+-------
+
+* #1292: Avoid generating ``Provides-Extra`` in metadata when
+ no extra is present (but environment markers are).
+
v38.6.0
-------
diff --git a/setup.cfg b/setup.cfg
index 560b724b..5a9a875c 100755
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 38.6.0
+current_version = 38.6.1
commit = True
tag = True
diff --git a/setup.py b/setup.py
index ff064e33..a59ba44b 100755
--- a/setup.py
+++ b/setup.py
@@ -89,7 +89,7 @@ def pypi_link(pkg_filename):
setup_params = dict(
name="setuptools",
- version="38.6.0",
+ version="38.6.1",
description="Easily download, build, install, upgrade, and uninstall "
"Python packages",
author="Python Packaging Authority",
diff --git a/setuptools/dist.py b/setuptools/dist.py
index a6928c49..b74dd0f5 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -413,7 +413,9 @@ class Distribution(Distribution_parse_config_files, _Distribution):
# Since this gets called multiple times at points where the
# keys have become 'converted' extras, ensure that we are only
# truly adding extras we haven't seen before here.
- self.metadata.provides_extras.add(extra.split(':')[0])
+ extra = extra.split(':')[0]
+ if extra:
+ self.metadata.provides_extras.add(extra)
self._convert_extras_requirements()
self._move_install_requirements_markers()
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
index ff5fa0a3..d2211671 100644
--- a/setuptools/tests/test_egg_info.py
+++ b/setuptools/tests/test_egg_info.py
@@ -438,6 +438,23 @@ class TestEggInfo(object):
assert 'Provides-Extra: foobar' in pkg_info_lines
assert 'Metadata-Version: 2.1' in pkg_info_lines
+ def test_doesnt_provides_extra(self, tmpdir_cwd, env):
+ self._setup_script_with_requires(
+ '''install_requires=["spam ; python_version<'3.3'"]''')
+ environ = os.environ.copy().update(
+ HOME=env.paths['home'],
+ )
+ environment.run_setup_py(
+ cmd=['egg_info'],
+ pypath=os.pathsep.join([env.paths['lib'], str(tmpdir_cwd)]),
+ data_stream=1,
+ env=environ,
+ )
+ egg_info_dir = os.path.join('.', 'foo.egg-info')
+ with open(os.path.join(egg_info_dir, 'PKG-INFO')) as pkginfo_file:
+ pkg_info_text = pkginfo_file.read()
+ assert 'Provides-Extra:' not in pkg_info_text
+
def test_long_description_content_type(self, tmpdir_cwd, env):
# Test that specifying a `long_description_content_type` keyword arg to
# the `setup` function results in writing a `Description-Content-Type`