diff options
-rw-r--r-- | docs/setuptools.txt | 10 | ||||
-rw-r--r-- | setuptools/config.py | 11 | ||||
-rw-r--r-- | setuptools/tests/test_config.py | 13 |
3 files changed, 13 insertions, 21 deletions
diff --git a/docs/setuptools.txt b/docs/setuptools.txt index 2c197d98..f0da6e1d 100644 --- a/docs/setuptools.txt +++ b/docs/setuptools.txt @@ -2302,10 +2302,10 @@ boilerplate code in some cases. long_description = file: README.rst keywords = one, two license = BSD 3-Clause License - - [metadata.classifiers] - Framework :: Django - Programming Language :: Python :: 3.5 + classifiers = + Framework :: Django + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.5 [options] zip_safe = False @@ -2398,7 +2398,7 @@ author str author_email author-email str maintainer str maintainer_email maintainer-email str -classifiers classifier file:, section, list-comma +classifiers classifier file:, list-comma license file:, str description summary file:, str long_description long-description file:, str diff --git a/setuptools/config.py b/setuptools/config.py index 19b39629..39a01f88 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -412,17 +412,6 @@ class ConfigMetadataHandler(ConfigHandler): 'version': self._parse_version, } - def parse_section_classifiers(self, section_options): - """Parses configuration file section. - - :param dict section_options: - """ - classifiers = [] - for begin, (_, rest) in section_options.items(): - classifiers.append('%s :%s' % (begin.title(), rest)) - - self['classifiers'] = classifiers - def _parse_version(self, value): """Parses `version` option value. diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index fa8d523b..799fb165 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -257,6 +257,7 @@ class TestMetadata: def test_classifiers(self, tmpdir): expected = set([ 'Framework :: Django', + 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', ]) @@ -269,19 +270,21 @@ class TestMetadata: tmpdir.join('classifiers').write( 'Framework :: Django\n' + 'Programming Language :: Python :: 3\n' 'Programming Language :: Python :: 3.5\n' ) with get_dist(tmpdir) as dist: assert set(dist.metadata.classifiers) == expected - # From section. + # From list notation config.write( - '[metadata.classifiers]\n' - 'Framework :: Django\n' - 'Programming Language :: Python :: 3.5\n' + '[metadata]\n' + 'classifiers =\n' + ' Framework :: Django\n' + ' Programming Language :: Python :: 3\n' + ' Programming Language :: Python :: 3.5\n' ) - with get_dist(tmpdir) as dist: assert set(dist.metadata.classifiers) == expected |