aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoridle sign <idlesign@yandex.ru>2017-02-04 15:21:12 +0700
committeridle sign <idlesign@yandex.ru>2017-02-04 15:21:12 +0700
commit50830de19302234b6741e2d1b853fbf07fbedf95 (patch)
treeb6ca4fc287c0b1bade4aaae1cb320602a12b9d38
parent3ddf493a251e92f46d5516713f37ac206c735b4e (diff)
downloadexternal_python_setuptools-50830de19302234b6741e2d1b853fbf07fbedf95.tar.gz
external_python_setuptools-50830de19302234b6741e2d1b853fbf07fbedf95.tar.bz2
external_python_setuptools-50830de19302234b6741e2d1b853fbf07fbedf95.zip
Dropped support for classifiers subsection handling in setup.cfg (see #952).
-rw-r--r--docs/setuptools.txt10
-rw-r--r--setuptools/config.py11
-rw-r--r--setuptools/tests/test_config.py13
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