diff --git a/acme/pyproject.toml b/acme/pyproject.toml new file mode 100644 index 000000000..be58bb516 --- /dev/null +++ b/acme/pyproject.toml @@ -0,0 +1,55 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "acme" +dynamic = ["version"] +description = "ACME protocol implementation in Python" +readme = "README.rst" +license = "Apache-2.0" +requires-python = ">=3.10" +authors = [ + { name = "Certbot Project", email = "certbot-dev@eff.org" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Security", +] +dependencies = [ + "cryptography>=43.0.0", + "josepy>=2.0.0", + # PyOpenSSL>=25.0.0 is just needed to satisfy mypy right now so this dependency can probably be + # relaxed to >=24.0.0 if needed. + "PyOpenSSL>=25.0.0", + "pyrfc3339", + "requests>=2.25.1", +] + +[project.optional-dependencies] +docs = [ + "Sphinx>=1.0", # autodoc_member_order = 'bysource', autodoc_default_flags + "sphinx_rtd_theme", +] +test = [ + "pytest", + "pytest-xdist", + "typing-extensions", +] + +[project.urls] +Homepage = "https://github.com/certbot/certbot" + +[tool.setuptools] +package-dir = {"" = "src"} + +[tool.setuptools.packages.find] +where = ["src"] diff --git a/acme/setup.py b/acme/setup.py index 29ca6d28d..350bf80f4 100644 --- a/acme/setup.py +++ b/acme/setup.py @@ -1,58 +1,7 @@ -from setuptools import find_packages from setuptools import setup version = '5.0.0.dev0' -install_requires = [ - 'cryptography>=43.0.0', - 'josepy>=2.0.0', - # PyOpenSSL>=25.0.0 is just needed to satisfy mypy right now so this dependency can probably be - # relaxed to >=24.0.0 if needed. - 'PyOpenSSL>=25.0.0', - 'pyrfc3339', - 'requests>=2.25.1', -] - -docs_extras = [ - 'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags - 'sphinx_rtd_theme', -] - -test_extras = [ - 'pytest', - 'pytest-xdist', - 'typing-extensions', -] - setup( - name='acme', version=version, - description='ACME protocol implementation in Python', - url='https://github.com/certbot/certbot', - author="Certbot Project", - author_email='certbot-dev@eff.org', - license='Apache License 2.0', - python_requires='>=3.10', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Apache Software License', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Programming Language :: Python :: 3.13', - 'Topic :: Internet :: WWW/HTTP', - 'Topic :: Security', - ], - - packages=find_packages(where='src'), - package_dir={'': 'src'}, - include_package_data=True, - install_requires=install_requires, - extras_require={ - 'docs': docs_extras, - 'test': test_extras, - }, ) diff --git a/certbot-apache/pyproject.toml b/certbot-apache/pyproject.toml new file mode 100644 index 000000000..4dbcbdacc --- /dev/null +++ b/certbot-apache/pyproject.toml @@ -0,0 +1,52 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "certbot-apache" +dynamic = ["version", "dependencies"] +description = "Apache plugin for Certbot" +readme = "README.rst" +license = "Apache-2.0" +requires-python = ">=3.10" +authors = [ + { name = "Certbot Project", email = "certbot-dev@eff.org" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Plugins", + "Intended Audience :: System Administrators", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Security", + "Topic :: System :: Installation/Setup", + "Topic :: System :: Networking", + "Topic :: System :: Systems Administration", + "Topic :: Utilities", +] + +[project.optional-dependencies] +dev = [ + "apacheconfig>=0.3.2", +] +test = [ + "pytest", +] + +[project.entry-points."certbot.plugins"] +apache = "certbot_apache._internal.entrypoint:ENTRYPOINT" + +[project.urls] +Homepage = "https://github.com/certbot/certbot" + +[tool.setuptools] +package-dir = {"" = "src"} + +[tool.setuptools.packages.find] +where = ["src"] diff --git a/certbot-apache/setup.py b/certbot-apache/setup.py index a668c21aa..d3e43f81d 100644 --- a/certbot-apache/setup.py +++ b/certbot-apache/setup.py @@ -1,4 +1,3 @@ -from setuptools import find_packages from setuptools import setup version = '5.0.0.dev0' @@ -12,54 +11,7 @@ install_requires = [ 'python-augeas', ] -dev_extras = [ - 'apacheconfig>=0.3.2', -] - -test_extras = [ - 'pytest', -] - setup( - name='certbot-apache', version=version, - description="Apache plugin for Certbot", - url='https://github.com/certbot/certbot', - author="Certbot Project", - author_email='certbot-dev@eff.org', - license='Apache License 2.0', - python_requires='>=3.10', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Plugins', - 'Intended Audience :: System Administrators', - 'License :: OSI Approved :: Apache Software License', - 'Operating System :: POSIX :: Linux', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Programming Language :: Python :: 3.13', - 'Topic :: Internet :: WWW/HTTP', - 'Topic :: Security', - 'Topic :: System :: Installation/Setup', - 'Topic :: System :: Networking', - 'Topic :: System :: Systems Administration', - 'Topic :: Utilities', - ], - - packages=find_packages(where='src'), - package_dir={'': 'src'}, - include_package_data=True, install_requires=install_requires, - extras_require={ - 'dev': dev_extras, - 'test': test_extras, - }, - entry_points={ - 'certbot.plugins': [ - 'apache = certbot_apache._internal.entrypoint:ENTRYPOINT', - ], - }, ) diff --git a/certbot-nginx/pyproject.toml b/certbot-nginx/pyproject.toml new file mode 100644 index 000000000..2818e37f1 --- /dev/null +++ b/certbot-nginx/pyproject.toml @@ -0,0 +1,49 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "certbot-nginx" +dynamic = ["version", "dependencies"] +description = "Nginx plugin for Certbot" +readme = "README.rst" +license = "Apache-2.0" +requires-python = ">=3.10" +authors = [ + { name = "Certbot Project", email = "certbot-dev@eff.org" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Plugins", + "Intended Audience :: System Administrators", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Security", + "Topic :: System :: Installation/Setup", + "Topic :: System :: Networking", + "Topic :: System :: Systems Administration", + "Topic :: Utilities", +] + +[project.optional-dependencies] +test = [ + "pytest", +] + +[project.entry-points."certbot.plugins"] +nginx = "certbot_nginx._internal.configurator:NginxConfigurator" + +[project.urls] +Homepage = "https://github.com/certbot/certbot" + +[tool.setuptools] +package-dir = {"" = "src"} + +[tool.setuptools.packages.find] +where = ["src"] diff --git a/certbot-nginx/setup.py b/certbot-nginx/setup.py index 82a59b5d3..ba052a46f 100644 --- a/certbot-nginx/setup.py +++ b/certbot-nginx/setup.py @@ -1,4 +1,3 @@ -from setuptools import find_packages from setuptools import setup version = '5.0.0.dev0' @@ -15,49 +14,7 @@ install_requires = [ 'pyparsing>=2.4.7', ] -test_extras = [ - 'pytest', -] - setup( - name='certbot-nginx', version=version, - description="Nginx plugin for Certbot", - url='https://github.com/certbot/certbot', - author="Certbot Project", - author_email='certbot-dev@eff.org', - license='Apache License 2.0', - python_requires='>=3.10', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Plugins', - 'Intended Audience :: System Administrators', - 'License :: OSI Approved :: Apache Software License', - 'Operating System :: POSIX :: Linux', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Programming Language :: Python :: 3.13', - 'Topic :: Internet :: WWW/HTTP', - 'Topic :: Security', - 'Topic :: System :: Installation/Setup', - 'Topic :: System :: Networking', - 'Topic :: System :: Systems Administration', - 'Topic :: Utilities', - ], - - packages=find_packages(where='src'), - package_dir={'': 'src'}, - include_package_data=True, install_requires=install_requires, - extras_require={ - 'test': test_extras, - }, - entry_points={ - 'certbot.plugins': [ - 'nginx = certbot_nginx._internal.configurator:NginxConfigurator', - ], - }, ) diff --git a/newsfragments/10417.changed b/newsfragments/10417.changed new file mode 100644 index 000000000..aecb45185 --- /dev/null +++ b/newsfragments/10417.changed @@ -0,0 +1 @@ +Migrated most functionality from `setup.py` to `pyproject.toml` for acme, certbot-apache, and certbot-nginx. \ No newline at end of file