Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize pyroma #72

Merged
merged 3 commits into from
Mar 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.6', '3.10', 'pypy-3.7']
python-version: ['3.7', '3.10', 'pypy-3.7']

steps:
- name: Checkout
Expand Down
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
- repo: https://github.com/regebro/pyroma
rev: '3.2'
hooks:
- id: pyroma
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ graft pyroma/testdata/distributions
include tox.ini
include DEVELOPMENT.rst
include Makefile
exclude .pre-commit-config.yaml
11 changes: 8 additions & 3 deletions fetch_classifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,14 @@ def update_classifiers():

out.write(b"""CODE_LICENSES = {\n""")
for code, licenses in code_map.items():
out.write(b' "%s": {\n "' % code)
out.write(b'",\n "'.join(licenses))
out.write(b'"},\n')
out.write(b' "%s": {' % code)
if len(licenses) > 1:
out.write(b'\n "')
out.write(b'",\n "'.join(licenses))
out.write(b'",\n },\n')
else:
out.write(b'"%s' % list(licenses)[0])
out.write(b'"},\n')
out.write(b"""}\n""")


Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[tool.black]
line-length = 120

189 changes: 93 additions & 96 deletions pyroma/classifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
"Environment :: GPU :: NVIDIA CUDA :: 11.0",
"Environment :: GPU :: NVIDIA CUDA :: 11.1",
"Environment :: GPU :: NVIDIA CUDA :: 11.2",
"Environment :: GPU :: NVIDIA CUDA :: 11.3",
"Environment :: GPU :: NVIDIA CUDA :: 11.4",
"Environment :: GPU :: NVIDIA CUDA :: 11.5",
"Environment :: Handhelds/PDA's",
"Environment :: MacOS X",
"Environment :: MacOS X :: Aqua",
Expand All @@ -64,6 +67,9 @@
"Framework :: AWS CDK :: 1",
"Framework :: AiiDA",
"Framework :: Ansible",
"Framework :: AnyIO",
"Framework :: Apache Airflow",
"Framework :: Apache Airflow :: Provider",
"Framework :: AsyncIO",
"Framework :: BEAT",
"Framework :: BFG",
Expand All @@ -74,11 +80,14 @@
"Framework :: Buildout :: Recipe",
"Framework :: CastleCMS",
"Framework :: CastleCMS :: Theme",
"Framework :: Celery",
"Framework :: Chandler",
"Framework :: CherryPy",
"Framework :: CubicWeb",
"Framework :: Dash",
"Framework :: Datasette",
"Framework :: Django",
"Framework :: Django :: 1",
"Framework :: Django :: 1.4",
"Framework :: Django :: 1.5",
"Framework :: Django :: 1.6",
Expand All @@ -87,30 +96,54 @@
"Framework :: Django :: 1.9",
"Framework :: Django :: 1.10",
"Framework :: Django :: 1.11",
"Framework :: Django :: 2",
"Framework :: Django :: 2.0",
"Framework :: Django :: 2.1",
"Framework :: Django :: 2.2",
"Framework :: Django :: 3",
"Framework :: Django :: 3.0",
"Framework :: Django :: 3.1",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4",
"Framework :: Django :: 4.0",
"Framework :: Django CMS",
"Framework :: Django CMS :: 3.4",
"Framework :: Django CMS :: 3.5",
"Framework :: Django CMS :: 3.6",
"Framework :: Django CMS :: 3.7",
"Framework :: Django CMS :: 3.8",
"Framework :: Django CMS :: 3.9",
"Framework :: Django CMS :: 3.10",
"Framework :: FastAPI",
"Framework :: Flake8",
"Framework :: Flask",
"Framework :: Hypothesis",
"Framework :: IDLE",
"Framework :: IPython",
"Framework :: Jupyter",
"Framework :: Jupyter :: JupyterLab",
"Framework :: Jupyter :: JupyterLab :: 1",
"Framework :: Jupyter :: JupyterLab :: 2",
"Framework :: Jupyter :: JupyterLab :: 3",
"Framework :: Jupyter :: JupyterLab :: 4",
"Framework :: Jupyter :: JupyterLab :: Extensions",
"Framework :: Jupyter :: JupyterLab :: Extensions :: Mime Renderers",
"Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt",
"Framework :: Jupyter :: JupyterLab :: Extensions :: Themes",
"Framework :: Kedro",
"Framework :: Lektor",
"Framework :: Masonite",
"Framework :: Matplotlib",
"Framework :: Nengo",
"Framework :: Odoo",
"Framework :: Odoo :: 8.0",
"Framework :: Odoo :: 9.0",
"Framework :: Odoo :: 10.0",
"Framework :: Odoo :: 11.0",
"Framework :: Odoo :: 12.0",
"Framework :: Odoo :: 13.0",
"Framework :: Odoo :: 14.0",
"Framework :: Odoo :: 15.0",
"Framework :: Opps",
"Framework :: Paste",
"Framework :: Pelican",
Expand Down Expand Up @@ -161,6 +194,8 @@
"Framework :: Zope :: 3",
"Framework :: Zope :: 4",
"Framework :: Zope :: 5",
"Framework :: aiohttp",
"Framework :: cocotb",
"Framework :: napari",
"Framework :: tox",
"Intended Audience :: Customer Service",
Expand Down Expand Up @@ -372,6 +407,7 @@
"Programming Language :: C++",
"Programming Language :: Cold Fusion",
"Programming Language :: Cython",
"Programming Language :: D",
"Programming Language :: Delphi/Kylix",
"Programming Language :: Dylan",
"Programming Language :: Eiffel",
Expand Down Expand Up @@ -424,6 +460,7 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: IronPython",
Expand Down Expand Up @@ -756,6 +793,7 @@
"Topic :: Text Processing :: Markup :: XML",
"Topic :: Text Processing :: Markup :: reStructuredText",
"Topic :: Utilities",
"Typing :: Stubs Only",
"Typing :: Typed",
}

Expand All @@ -780,13 +818,13 @@
"License :: OSI Approved :: GNU Free Documentation License (FDL)": {"FDL"},
"License :: OSI Approved :: GNU General Public License (GPL)": {"GPL"},
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)": {"GPL", "GPLv2"},
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)": {"GPL", "GPLv2+"},
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)": {"GPLv2+", "GPL"},
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)": {"GPL", "GPLv3"},
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)": {"GPL", "GPLv3+"},
"License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)": {"LGPL", "LGPLv2"},
"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)": {"LGPL", "LGPLv2+"},
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)": {"LGPLv3", "LGPL"},
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)": {"LGPLv3+", "LGPL"},
"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)": {"LGPLv2+", "LGPL"},
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)": {"LGPL", "LGPLv3"},
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)": {"LGPL", "LGPLv3+"},
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)": {"LGPL"},
"License :: OSI Approved :: Historical Permission Notice and Disclaimer (HPND)": {"HPND"},
"License :: OSI Approved :: ISC License (ISCL)": {"ISCL"},
Expand All @@ -808,102 +846,61 @@
}

CODE_LICENSES = {
"AFPL": {
"License :: Aladdin Free Public License (AFPL)"},
"CC0 1.0": {
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication"},
"CECILL-B": {
"License :: CeCILL-B Free Software License Agreement (CECILL-B)"},
"CECILL-C": {
"License :: CeCILL-C Free Software License Agreement (CECILL-C)"},
"EFL": {
"License :: Eiffel Forum License (EFL)"},
"NPL": {
"License :: Netscape Public License (NPL)"},
"NOKOS": {
"License :: Nokia Open Source License (NOKOS)"},
"AFL": {
"License :: OSI Approved :: Academic Free License (AFL)"},
"BSL-1.0": {
"License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)"},
"CeCILL-2.1": {
"License :: OSI Approved :: CEA CNRS Inria Logiciel Libre License, version 2.1 (CeCILL-2.1)"},
"CDDL-1.0": {
"License :: OSI Approved :: Common Development and Distribution License 1.0 (CDDL-1.0)"},
"EPL-1.0": {
"License :: OSI Approved :: Eclipse Public License 1.0 (EPL-1.0)"},
"EPL-2.0": {
"License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)"},
"EUPL 1.0": {
"License :: OSI Approved :: European Union Public Licence 1.0 (EUPL 1.0)"},
"EUPL 1.1": {
"License :: OSI Approved :: European Union Public Licence 1.1 (EUPL 1.1)"},
"EUPL 1.2": {
"License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)"},
"AGPLv3+": {
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)"},
"FDL": {
"License :: OSI Approved :: GNU Free Documentation License (FDL)"},
"AFPL": {"License :: Aladdin Free Public License (AFPL)"},
"CC0 1.0": {"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication"},
"CECILL-B": {"License :: CeCILL-B Free Software License Agreement (CECILL-B)"},
"CECILL-C": {"License :: CeCILL-C Free Software License Agreement (CECILL-C)"},
"EFL": {"License :: Eiffel Forum License (EFL)"},
"NPL": {"License :: Netscape Public License (NPL)"},
"NOKOS": {"License :: Nokia Open Source License (NOKOS)"},
"AFL": {"License :: OSI Approved :: Academic Free License (AFL)"},
"BSL-1.0": {"License :: OSI Approved :: Boost Software License 1.0 (BSL-1.0)"},
"CeCILL-2.1": {"License :: OSI Approved :: CEA CNRS Inria Logiciel Libre License, version 2.1 (CeCILL-2.1)"},
"CDDL-1.0": {"License :: OSI Approved :: Common Development and Distribution License 1.0 (CDDL-1.0)"},
"EPL-1.0": {"License :: OSI Approved :: Eclipse Public License 1.0 (EPL-1.0)"},
"EPL-2.0": {"License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)"},
"EUPL 1.0": {"License :: OSI Approved :: European Union Public Licence 1.0 (EUPL 1.0)"},
"EUPL 1.1": {"License :: OSI Approved :: European Union Public Licence 1.1 (EUPL 1.1)"},
"EUPL 1.2": {"License :: OSI Approved :: European Union Public Licence 1.2 (EUPL 1.2)"},
"AGPLv3+": {"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)"},
"FDL": {"License :: OSI Approved :: GNU Free Documentation License (FDL)"},
"GPL": {
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"License :: OSI Approved :: GNU General Public License (GPL)",
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)"},
"GPLv2": {
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)"},
"GPLv2+": {
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)"},
"GPLv3": {
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)"},
"GPLv3+": {
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)"},
"LGPLv2": {
"License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)"},
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
},
"GPLv2": {"License :: OSI Approved :: GNU General Public License v2 (GPLv2)"},
"GPLv2+": {"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)"},
"GPLv3": {"License :: OSI Approved :: GNU General Public License v3 (GPLv3)"},
"GPLv3+": {"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)"},
"LGPLv2": {"License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)"},
"LGPL": {
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)",
"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)"},
"LGPLv2+": {
"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)"},
"LGPLv3": {
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)"},
"LGPLv3+": {
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)"},
"HPND": {
"License :: OSI Approved :: Historical Permission Notice and Disclaimer (HPND)"},
"ISCL": {
"License :: OSI Approved :: ISC License (ISCL)"},
"MIT": {
"License :: OSI Approved :: MIT License"},
"MIT-0": {
"License :: OSI Approved :: MIT No Attribution License (MIT-0)"},
"CVW": {
"License :: OSI Approved :: MITRE Collaborative Virtual Workspace License (CVW)"},
"MirOS": {
"License :: OSI Approved :: MirOS License (MirOS)"},
"MPL": {
"License :: OSI Approved :: Mozilla Public License 1.0 (MPL)"},
"MPL 1.1": {
"License :: OSI Approved :: Mozilla Public License 1.1 (MPL 1.1)"},
"MPL 2.0": {
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)"},
"OSL-3.0": {
"License :: OSI Approved :: Open Software License 3.0 (OSL-3.0)"},
"CNRI Python License": {
"License :: OSI Approved :: Python License (CNRI Python License)"},
"QPL": {
"License :: OSI Approved :: Qt Public License (QPL)"},
"OFL-1.1": {
"License :: OSI Approved :: SIL Open Font License 1.1 (OFL-1.1)"},
"SISSL": {
"License :: OSI Approved :: Sun Industry Standards Source License (SISSL)"},
"Unlicense": {
"License :: OSI Approved :: The Unlicense (Unlicense)"},
"UPL": {
"License :: OSI Approved :: Universal Permissive License (UPL)"},
"ZPL": {
"License :: OSI Approved :: Zope Public License"},
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)",
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
},
"LGPLv2+": {"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)"},
"LGPLv3": {"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)"},
"LGPLv3+": {"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)"},
"HPND": {"License :: OSI Approved :: Historical Permission Notice and Disclaimer (HPND)"},
"ISCL": {"License :: OSI Approved :: ISC License (ISCL)"},
"MIT": {"License :: OSI Approved :: MIT License"},
"MIT-0": {"License :: OSI Approved :: MIT No Attribution License (MIT-0)"},
"CVW": {"License :: OSI Approved :: MITRE Collaborative Virtual Workspace License (CVW)"},
"MirOS": {"License :: OSI Approved :: MirOS License (MirOS)"},
"MPL": {"License :: OSI Approved :: Mozilla Public License 1.0 (MPL)"},
"MPL 1.1": {"License :: OSI Approved :: Mozilla Public License 1.1 (MPL 1.1)"},
"MPL 2.0": {"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)"},
"OSL-3.0": {"License :: OSI Approved :: Open Software License 3.0 (OSL-3.0)"},
"CNRI Python License": {"License :: OSI Approved :: Python License (CNRI Python License)"},
"QPL": {"License :: OSI Approved :: Qt Public License (QPL)"},
"OFL-1.1": {"License :: OSI Approved :: SIL Open Font License 1.1 (OFL-1.1)"},
"SISSL": {"License :: OSI Approved :: Sun Industry Standards Source License (SISSL)"},
"Unlicense": {"License :: OSI Approved :: The Unlicense (Unlicense)"},
"UPL": {"License :: OSI Approved :: Universal Permissive License (UPL)"},
"ZPL": {"License :: OSI Approved :: Zope Public License"},
}
Loading