From 9ef16ae7162674aac971ba06a996fa92ad66e186 Mon Sep 17 00:00:00 2001 From: KOLANICH Date: Thu, 3 Nov 2022 12:56:10 +0300 Subject: [PATCH] Moved the metadata from `setup.py` into `pyproject.toml`. Moved all the "requirements*.txt" into `pyproject.toml` under extras. --- pyproject.toml | 63 ++++++++++++++++++++++++++++++++++++++++++- requirements-rtd.txt | 3 --- requirements-test.txt | 8 ------ requirements.txt | 3 --- setup.cfg | 55 +------------------------------------ 5 files changed, 63 insertions(+), 69 deletions(-) delete mode 100644 requirements-rtd.txt delete mode 100644 requirements-test.txt delete mode 100644 requirements.txt diff --git a/pyproject.toml b/pyproject.toml index 9787c3bd..02a7a3f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,64 @@ [build-system] -requires = ["setuptools", "wheel"] +requires = ["setuptools>=61.2"] build-backend = "setuptools.build_meta" + +[project] +name = "PGPy" +version = "0.6.0-dev" +authors = [{name = "Michael Greene", email = "mgreene@securityinnovation.com"}] +maintainers = [{name = "Security Innovation", email = "opensource@securityinnovation.com"}] +license = {text = "BSD-3-Clause"} +description = "Pretty Good Privacy for Python" +readme = "README.rst" +keywords = ["OpenPGP", "PGP", "Pretty Good Privacy", "GPG", "GnuPG", "openpgp", "pgp", "gnupg", "gpg", "encryption", "signature"] +classifiers = [ + "Development Status :: 4 - Beta", + "Operating System :: POSIX :: Linux", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.5", + "Programming Language :: Python :: Implementation :: CPython", + "Topic :: Security", + "Topic :: Security :: Cryptography", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Python Modules", + "License :: OSI Approved :: BSD License", +] +requires-python = ">=3.5" +dependencies = [ + "cryptography>=2.6,<38", # TODO: fix support for cryptography >= 38.0.0 (https://github.com/SecurityInnovation/PGPy/issues/402) + "pyasn1", + "six>=1.9.0", +] + +[project.optional-dependencies] +docs-build = ["sphinx", "sphinx-better-theme"] +test = [ + "pytest", + "pytest-cov", + "pytest-order @ git+https://github.com/SecurityInnovation/pytest-order.git@07ceb36233fb083275f34d5c8abbd3e35cd00158#egg=pytest-order", # We need a patched version of pytest-order to run on 3.5 and handle parameterized tests, + "flake8", + "pep8-naming", + # "gpg", # is not here on purpose currently +] + +[project.urls] +Homepage = "https://github.com/SecurityInnovation/PGPy" +Documentation = "https://pgpy.readthedocs.io/en/latest/" +"Bug Tracker" = "https://github.com/SecurityInnovation/PGPy/issues" + +[tool.setuptools] +zip-safe = true +include-package-data = false + +[tool.setuptools.packages.find] +include = ["pgpy", "pgpy.*"] + diff --git a/requirements-rtd.txt b/requirements-rtd.txt deleted file mode 100644 index 03ab4f6f..00000000 --- a/requirements-rtd.txt +++ /dev/null @@ -1,3 +0,0 @@ --r requirements.txt -Sphinx~=4.3.2 -sphinx-better-theme diff --git a/requirements-test.txt b/requirements-test.txt deleted file mode 100644 index 6e01e42b..00000000 --- a/requirements-test.txt +++ /dev/null @@ -1,8 +0,0 @@ --r requirements.txt -pytest -pytest-cov -# We need a patched version of pytest-order to run on 3.5 and handle parameterized tests -git+https://github.com/SecurityInnovation/pytest-order.git@07ceb36233fb083275f34d5c8abbd3e35cd00158#egg=pytest-order -flake8 -pep8-naming -# NOTE: gpg is not here on purpose currently diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index c57dfe47..00000000 --- a/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -cryptography>=2.6 -pyasn1 -six>=1.9.0 diff --git a/setup.cfg b/setup.cfg index f8c2b2ed..8fb7d254 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,57 +1,4 @@ -[metadata] -name = PGPy -version = 0.6.0-dev -author = Michael Greene -author_email = mgreene@securityinnovation.com -maintainer = Security Innovation -maintainer_email = opensource@securityinnovation.com -license = BSD-3-Clause -description = Pretty Good Privacy for Python -keywords = OpenPGP, PGP, Pretty Good Privacy, GPG, GnuPG, openpgp, pgp, gnupg, gpg, encryption, signature -url = https://github.com/SecurityInnovation/PGPy -project_urls = - Documentation = https://pgpy.readthedocs.io/en/latest/ - Bug Tracker = https://github.com/SecurityInnovation/PGPy/issues -long_description = file: README.rst -long_description_content_type = text/x-rst -classifiers = - Development Status :: 4 - Beta - Operating System :: POSIX :: Linux - Operating System :: MacOS :: MacOS X - Operating System :: Microsoft :: Windows - Intended Audience :: Developers - Programming Language :: Python - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.7 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.5 - Programming Language :: Python :: Implementation :: CPython - Topic :: Security - Topic :: Security :: Cryptography - Topic :: Software Development :: Libraries - Topic :: Software Development :: Libraries :: Python Modules - License :: OSI Approved :: BSD License - -[options] -packages = - pgpy - pgpy.packet - pgpy.packet.subpackets -# TODO: fix support for cryptography >= 38.0.0 (https://github.com/SecurityInnovation/PGPy/issues/402) -install_requires = - cryptography>=2.6,<38 - pyasn1 - six>=1.9.0 -python_requires = >=3.5 - -# doc_requires = -# sphinx -# sphinx-better-theme - - +# https://github.com/sphinx-doc/sphinx/issues/9473 [build_sphinx] source-dir = docs/source build-dir = docs/build