diff options
author | Jeremy Stanley <fungi@yuggoth.org> | 2017-11-21 00:48:44 +0000 |
---|---|---|
committer | Jeremy Stanley <fungi@yuggoth.org> | 2017-11-22 19:24:12 +0000 |
commit | df2246449c271c07586bcecc3eaa36e9b0e94e3d (patch) | |
tree | a729506809366de107bf68d4d9962cd043dc0e93 /setuptools/tests/test_config.py | |
parent | d45be2cc4f7a1e4ddc70b363baaa613c6b068b98 (diff) | |
download | external_python_setuptools-df2246449c271c07586bcecc3eaa36e9b0e94e3d.tar.gz external_python_setuptools-df2246449c271c07586bcecc3eaa36e9b0e94e3d.tar.bz2 external_python_setuptools-df2246449c271c07586bcecc3eaa36e9b0e94e3d.zip |
Support PEP 345 Project-URL metadata
By including one or more Project-URL entries in PKG-INFO metadata,
PyPI can display helpful hyperlinks in a generic manner. Add support
here to be able to pass it through setup.cfg and setup.py with a
project_urls dict. See the corresponding section of the Core
Metadata Specifications from the Python Packaging User Guide for
details:
https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use
Diffstat (limited to 'setuptools/tests/test_config.py')
-rw-r--r-- | setuptools/tests/test_config.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index cdfa5af4..a69bca46 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -215,6 +215,22 @@ class TestMetadata: 'Programming Language :: Python :: 3.5', ] + def test_dict(self, tmpdir): + + fake_env( + tmpdir, + '[metadata]\n' + 'project_urls =\n' + ' Link One = https://example.com/one/\n' + ' Link Two = https://example.com/two/\n' + ) + with get_dist(tmpdir) as dist: + metadata = dist.metadata + assert metadata.project_urls == { + 'Link One': 'https://example.com/one/', + 'Link Two': 'https://example.com/two/', + } + def test_version(self, tmpdir): _, config = fake_env( |