From 1816e56557a966fc3fea45493b6dddbd2305f7ff Mon Sep 17 00:00:00 2001 From: ohemorange Date: Mon, 18 Aug 2025 09:57:14 -0700 Subject: [PATCH] Set up unreleased packages minus dns plugins to use pyproject.toml (#10424) Part of https://github.com/certbot/certbot/issues/10403 We were never actually updating the versions in certbot-ci and letstest. Not that it really matters, but let's do that there as well. --- certbot-ci/pyproject.toml | 57 +++++++++++++++++++++++ certbot-ci/setup.py | 53 --------------------- certbot-compatibility-test/pyproject.toml | 43 +++++++++++++++++ certbot-compatibility-test/setup.py | 38 --------------- letstest/pyproject.toml | 42 +++++++++++++++++ letstest/setup.py | 40 ++-------------- tools/_release.sh | 4 +- 7 files changed, 147 insertions(+), 130 deletions(-) create mode 100644 certbot-ci/pyproject.toml create mode 100644 certbot-compatibility-test/pyproject.toml create mode 100644 letstest/pyproject.toml diff --git a/certbot-ci/pyproject.toml b/certbot-ci/pyproject.toml new file mode 100644 index 000000000..bfb665dc8 --- /dev/null +++ b/certbot-ci/pyproject.toml @@ -0,0 +1,57 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "certbot-ci" +dynamic = ["version"] +description = "Certbot continuous integration framework" +license = "Apache-2.0" +requires-python = ">=3.10" +authors = [ + { name = "Certbot Project", email = "certbot-dev@eff.org" }, +] +classifiers = [ + "Development Status :: 3 - Alpha", + "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 = [ + "coverage", + "cryptography", + "pyopenssl", + "pytest", + "pytest-cov", + # This version is needed for "worker" attributes we currently use like + # "workerinput". See https://github.com/pytest-dev/pytest-xdist/pull/268. + "pytest-xdist>=1.22.1", + "python-dateutil", + # This dependency needs to be added using environment markers to avoid its + # installation on Linux. + "pywin32>=300 ; sys_platform == \"win32\"", + "pyyaml", + # requests unvendored its dependencies in version 2.16.0 and this code relies on that for + # calling `urllib3.disable_warnings`. + "requests>=2.25.1", + "types-python-dateutil", +] + +[project.scripts] +certbot_test = "certbot_integration_tests.utils.certbot_call:main" +run_acme_server = "certbot_integration_tests.utils.acme_server:main" + +[project.urls] +Homepage = "https://github.com/certbot/certbot" + +[tool.setuptools] +package-dir = {"" = "src"} + +[tool.setuptools.packages.find] +where = ["src"] diff --git a/certbot-ci/setup.py b/certbot-ci/setup.py index 0d7558a08..91a34c358 100644 --- a/certbot-ci/setup.py +++ b/certbot-ci/setup.py @@ -1,60 +1,7 @@ -from setuptools import find_packages from setuptools import setup version = '0.32.0.dev0' -install_requires = [ - 'coverage', - 'cryptography', - 'pyopenssl', - 'pytest', - 'pytest-cov', - # This version is needed for "worker" attributes we currently use like - # "workerinput". See https://github.com/pytest-dev/pytest-xdist/pull/268. - 'pytest-xdist>=1.22.1', - 'python-dateutil', - # This dependency needs to be added using environment markers to avoid its - # installation on Linux. - 'pywin32>=300 ; sys_platform == "win32"', - 'pyyaml', - # requests unvendored its dependencies in version 2.16.0 and this code relies on that for - # calling `urllib3.disable_warnings`. - 'requests>=2.25.1', - 'types-python-dateutil', -] - setup( - name='certbot-ci', version=version, - description="Certbot continuous integration framework", - 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 :: 3 - Alpha', - '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, - - entry_points={ - 'console_scripts': [ - 'certbot_test=certbot_integration_tests.utils.certbot_call:main', - 'run_acme_server=certbot_integration_tests.utils.acme_server:main', - ], - } ) diff --git a/certbot-compatibility-test/pyproject.toml b/certbot-compatibility-test/pyproject.toml new file mode 100644 index 000000000..ae9faa2a9 --- /dev/null +++ b/certbot-compatibility-test/pyproject.toml @@ -0,0 +1,43 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "certbot-compatibility-test" +dynamic = ["version"] +description = "Compatibility tests 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 :: 3 - Alpha", + "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 = [ + "certbot", + "certbot-apache", + "requests", +] + +[project.scripts] +certbot-compatibility-test = "certbot_compatibility_test.test_driver:main" + +[project.urls] +Homepage = "https://github.com/certbot/certbot" + +[tool.setuptools] +package-dir = {"" = "src"} + +[tool.setuptools.packages.find] +where = ["src"] diff --git a/certbot-compatibility-test/setup.py b/certbot-compatibility-test/setup.py index 034b7b488..350bf80f4 100644 --- a/certbot-compatibility-test/setup.py +++ b/certbot-compatibility-test/setup.py @@ -1,45 +1,7 @@ -from setuptools import find_packages from setuptools import setup version = '5.0.0.dev0' -install_requires = [ - 'certbot', - 'certbot-apache', - 'requests', -] - - setup( - name='certbot-compatibility-test', version=version, - description="Compatibility tests 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 :: 3 - Alpha', - '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, - entry_points={ - 'console_scripts': [ - 'certbot-compatibility-test = certbot_compatibility_test.test_driver:main', - ], - }, ) diff --git a/letstest/pyproject.toml b/letstest/pyproject.toml new file mode 100644 index 000000000..bd1d016ed --- /dev/null +++ b/letstest/pyproject.toml @@ -0,0 +1,42 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "letstest" +dynamic = ["version"] +description = "Test Certbot on different AWS images" +readme = "README.md" +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 = [ + "boto3", + "botocore", + # The API from Fabric 2.0+ is used instead of the 1.0 API. + "fabric>=2", + "pyyaml", +] + +[project.scripts] +letstest = "letstest.multitester:main" + +[project.urls] +Homepage = "https://github.com/certbot/certbot" + +[tool.setuptools.packages.find] +include = ["letstest"] diff --git a/letstest/setup.py b/letstest/setup.py index ba687aff2..97c5f01f1 100644 --- a/letstest/setup.py +++ b/letstest/setup.py @@ -1,41 +1,7 @@ -from setuptools import find_packages from setuptools import setup -setup( - name='letstest', - version='1.0', - description='Test Certbot on different AWS images', - 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', - ], +version = '1.0' - packages=find_packages(), - include_package_data=True, - install_requires=[ - 'boto3', - 'botocore', - # The API from Fabric 2.0+ is used instead of the 1.0 API. - 'fabric>=2', - 'pyyaml', - ], - entry_points={ - 'console_scripts': [ - 'letstest=letstest.multitester:main', - ], - } +setup( + version=version, ) diff --git a/tools/_release.sh b/tools/_release.sh index a2f95aa32..55fa15b35 100755 --- a/tools/_release.sh +++ b/tools/_release.sh @@ -104,7 +104,7 @@ git commit -m "Update changelog for $version release" SetVersion() { ver="$1" # bumping Certbot's version number is done differently - for pkg_dir in $SUBPKGS_NO_CERTBOT certbot-compatibility-test + for pkg_dir in $SUBPKGS_NO_CERTBOT certbot-compatibility-test certbot-ci letstest do setup_file="$pkg_dir/setup.py" if [ $(grep -c '^version' "$setup_file") != 1 ]; then @@ -120,7 +120,7 @@ SetVersion() { fi sed -i "s/^__version.*/__version__ = '$ver'/" "$init_file" - git add $SUBPKGS certbot-compatibility-test + git add $SUBPKGS certbot-compatibility-test certbot-ci letstest } SetVersion "$version"