From 7043691b7ecd70f36207bb0f4bcf0e450740210d Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Thu, 9 Apr 2020 18:45:02 -0500 Subject: [PATCH 1/3] README tweaks --- README.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c1c271a..0eeff1e 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,20 @@ -Canonical source for [classifiers](https://pypi.org/classifiers/) on -[PyPI](https://pypi.org). Classifiers [categorize -projects](https://packaging.python.org/specifications/core-metadata/#classifier-multiple-use) -per [PEP 301](https://www.python.org/dev/peps/pep-0301/). Use this -package to validate classifiers in packages for PyPI upload or -download. +Canonical source for [classifiers][1] on [PyPI][2]. + +Classifiers [categorize projects][3] per [PEP 301][4]. Use this package to +validate classifiers in packages for PyPI upload or download. ## Usage -To install [from PyPI](https://pypi.org/project/trove-classifiers/): +To install [from PyPI][5]: ``` -> pip install trove-classifiers +$ pip install trove-classifiers ``` This package's API is two importable objects: ### Classifiers (`trove_classifiers.classifiers`) -A `set` containing classifiers (as strings). Useful for determining membership +A `set` containing classifiers (as strings). Useful for determining membership. Example - determine if a classifier is valid: @@ -44,3 +42,9 @@ True >>> deprecated_classifiers["Natural Language :: Ukranian"] ['Natural Language :: Ukrainian'] ``` + +[1]: https://pypi.org/classifiers/ +[2]: https://pypi.org +[3]: https://packaging.python.org/specifications/core-metadata/#classifier-multiple-use +[4]: https://www.python.org/dev/peps/pep-0301/ +[5]: https://pypi.org/project/trove-classifiers/ From 3c91b751732c9f45c18334e001723b13fd05f89f Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Thu, 9 Apr 2020 18:45:43 -0500 Subject: [PATCH 2/3] Support 'python -m trove_classifiers' --- README.md | 9 ++++++++- trove_classifiers/__main__.py | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 trove_classifiers/__main__.py diff --git a/README.md b/README.md index 0eeff1e..67f6c49 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,14 @@ To install [from PyPI][5]: $ pip install trove-classifiers ``` -This package's API is two importable objects: +This package can be invoked as a module to print a list of classifiers: + +``` +$ python -m trove_classifiers | grep -Ei pyramid +Framework :: Pyramid +``` + +In addition, this package's API is two importable objects: ### Classifiers (`trove_classifiers.classifiers`) A `set` containing classifiers (as strings). Useful for determining membership. diff --git a/trove_classifiers/__main__.py b/trove_classifiers/__main__.py new file mode 100644 index 0000000..3c061fc --- /dev/null +++ b/trove_classifiers/__main__.py @@ -0,0 +1,4 @@ +from trove_classifiers import classifiers + +for classifier in sorted(classifiers): + print(classifier) From fe7f911f47c04538118bf8402e3fc87ba017c324 Mon Sep 17 00:00:00 2001 From: Dustin Ingram Date: Thu, 9 Apr 2020 18:48:17 -0500 Subject: [PATCH 3/3] Version 2020.04.09 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b7aa53a..e6b70a6 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name='trove-classifiers', - version='2020.04.01', + version='2020.04.09', description="Canonical source for classifiers on PyPI (pypi.org).", long_description=long_description, long_description_content_type="text/markdown",