Commit cb9b8793 authored by Jason R. Coombs's avatar Jason R. Coombs

Merge branch 'master' into HEAD

parents d8170d79 02569098
v38.6.1
-------
* #1292: Avoid generating ``Provides-Extra`` in metadata when
no extra is present (but environment markers are).
v38.6.0 v38.6.0
------- -------
......
[bumpversion] [bumpversion]
current_version = 38.6.0 current_version = 38.6.1
commit = True commit = True
tag = True tag = True
......
...@@ -89,7 +89,7 @@ def pypi_link(pkg_filename): ...@@ -89,7 +89,7 @@ def pypi_link(pkg_filename):
setup_params = dict( setup_params = dict(
name="setuptools", name="setuptools",
version="38.6.0", version="38.6.1",
description="Easily download, build, install, upgrade, and uninstall " description="Easily download, build, install, upgrade, and uninstall "
"Python packages", "Python packages",
author="Python Packaging Authority", author="Python Packaging Authority",
......
...@@ -413,7 +413,9 @@ class Distribution(Distribution_parse_config_files, _Distribution): ...@@ -413,7 +413,9 @@ class Distribution(Distribution_parse_config_files, _Distribution):
# Since this gets called multiple times at points where the # Since this gets called multiple times at points where the
# keys have become 'converted' extras, ensure that we are only # keys have become 'converted' extras, ensure that we are only
# truly adding extras we haven't seen before here. # 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._convert_extras_requirements()
self._move_install_requirements_markers() self._move_install_requirements_markers()
......
...@@ -438,6 +438,23 @@ class TestEggInfo(object): ...@@ -438,6 +438,23 @@ class TestEggInfo(object):
assert 'Provides-Extra: foobar' in pkg_info_lines assert 'Provides-Extra: foobar' in pkg_info_lines
assert 'Metadata-Version: 2.1' 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): def test_long_description_content_type(self, tmpdir_cwd, env):
# Test that specifying a `long_description_content_type` keyword arg to # Test that specifying a `long_description_content_type` keyword arg to
# the `setup` function results in writing a `Description-Content-Type` # the `setup` function results in writing a `Description-Content-Type`
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment