From cf48c7a417d32bad9e49c6d48cbad6d45c5c7a71 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 8 Jun 2021 13:47:51 -0700 Subject: [PATCH] split out test extras --- acme/setup.py | 13 ++++++------- certbot/setup.py | 27 +++++++++++++++++---------- letstest/scripts/test_apache2.sh | 2 +- tools/pinning/pyproject.toml | 4 ++-- tools/venv.py | 4 ++-- tox.ini | 14 +++++++------- 6 files changed, 35 insertions(+), 29 deletions(-) diff --git a/acme/setup.py b/acme/setup.py index 38e9208b6..ed8abce66 100644 --- a/acme/setup.py +++ b/acme/setup.py @@ -19,17 +19,16 @@ install_requires = [ 'setuptools>=39.0.1', ] -dev_extras = [ - 'pytest', - 'pytest-xdist', - 'tox', -] - docs_extras = [ 'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags 'sphinx_rtd_theme', ] +test_extras = [ + 'pytest', + 'pytest-xdist', +] + setup( name='acme', version=version, @@ -57,7 +56,7 @@ setup( include_package_data=True, install_requires=install_requires, extras_require={ - 'dev': dev_extras, 'docs': docs_extras, + 'test': test_extras, }, ) diff --git a/certbot/setup.py b/certbot/setup.py index eba0db3d7..f58e60dff 100644 --- a/certbot/setup.py +++ b/certbot/setup.py @@ -67,22 +67,12 @@ install_requires = [ ] dev_extras = [ - 'astroid', 'azure-devops', - 'coverage', 'ipdb', - 'mypy', 'PyGithub', # 1.1.0+ is required for poetry to use the poetry-core library for the # build system declared in tools/pinning/pyproject.toml. 'poetry>=1.1.0', - 'pylint', - 'pytest', - 'pytest-cov', - 'pytest-xdist', - # typing-extensions is required to import typing.Protocol and make the mypy checks - # pass (along with pylint about non-existent objects) on Python 3.6 & 3.7 - 'typing-extensions', 'tox', 'twine', 'wheel', @@ -96,6 +86,21 @@ docs_extras = [ 'sphinx_rtd_theme', ] +test_extras = [ + 'coverage', + 'mypy', + 'pylint', + 'pytest', + 'pytest-cov', + 'pytest-xdist', + # typing-extensions is required to import typing.Protocol and make the mypy checks + # pass (along with pylint about non-existent objects) on Python 3.6 & 3.7 + 'typing-extensions', +] + + +all_extras = dev_extras + docs_extras + test_extras + setup( name='certbot', version=version, @@ -132,8 +137,10 @@ setup( install_requires=install_requires, extras_require={ + 'all': all_extras, 'dev': dev_extras, 'docs': docs_extras, + 'test': test_extras, }, entry_points={ diff --git a/letstest/scripts/test_apache2.sh b/letstest/scripts/test_apache2.sh index 830ae44b2..5c30bdc35 100755 --- a/letstest/scripts/test_apache2.sh +++ b/letstest/scripts/test_apache2.sh @@ -45,7 +45,7 @@ if [ $? -ne 0 ] ; then exit 1 fi -tools/venv.py -e acme[dev] -e certbot[dev,docs] -e certbot-apache -e certbot-ci +tools/venv.py -e acme -e certbot -e certbot-apache -e certbot-ci tox PEBBLE_LOGS="acme_server.log" PEBBLE_URL="https://localhost:14000/dir" # We configure Pebble to use port 80 for http-01 validation rather than an diff --git a/tools/pinning/pyproject.toml b/tools/pinning/pyproject.toml index b7257bae2..71de245a4 100644 --- a/tools/pinning/pyproject.toml +++ b/tools/pinning/pyproject.toml @@ -30,8 +30,8 @@ certbot-dns-route53 = {path = "../../certbot-dns-route53", extras = ["docs"]} certbot-dns-sakuracloud = {path = "../../certbot-dns-sakuracloud", extras = ["docs"]} certbot-nginx = {path = "../../certbot-nginx", extras = ["docs"]} certbot-apache = {path = "../../certbot-apache", extras = ["dev"]} -certbot = {path = "../../certbot", extras = ["dev", "docs"]} -acme = {path = "../../acme", extras = ["dev", "docs"]} +certbot = {path = "../../certbot", extras = ["all"]} +acme = {path = "../../acme", extras = ["test"]} letstest = {path = "../../letstest"} windows-installer = {path = "../../windows-installer"} diff --git a/tools/venv.py b/tools/venv.py index f3f5781fa..8d8b01018 100755 --- a/tools/venv.py +++ b/tools/venv.py @@ -24,8 +24,8 @@ import sys import time REQUIREMENTS = [ - '-e acme[dev]', - '-e certbot[dev,docs]', + '-e acme[test]', + '-e certbot[all]', '-e certbot-apache', '-e certbot-dns-cloudflare', '-e certbot-dns-cloudxns', diff --git a/tox.ini b/tox.ini index cfe6ba2c5..7bdb57cff 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,7 @@ install_packages = python {toxinidir}/tools/pip_install_editable.py {[base]all_p # behavior with substitutions that contain line continuations, see # https://github.com/tox-dev/tox/issues/2069 for more info. dns_packages = certbot-dns-cloudflare certbot-dns-cloudxns certbot-dns-digitalocean certbot-dns-dnsimple certbot-dns-dnsmadeeasy certbot-dns-gehirn certbot-dns-google certbot-dns-linode certbot-dns-luadns certbot-dns-nsone certbot-dns-ovh certbot-dns-rfc2136 certbot-dns-route53 certbot-dns-sakuracloud -all_packages = acme[dev] certbot[dev] certbot-apache {[base]dns_packages} certbot-nginx +all_packages = acme[test] certbot[test] certbot-apache {[base]dns_packages} certbot-nginx source_paths = acme/acme certbot/certbot certbot-ci/certbot_integration_tests certbot-apache/certbot_apache certbot-compatibility-test/certbot_compatibility_test certbot-dns-cloudflare/certbot_dns_cloudflare certbot-dns-cloudxns/certbot_dns_cloudxns certbot-dns-digitalocean/certbot_dns_digitalocean certbot-dns-dnsimple/certbot_dns_dnsimple certbot-dns-dnsmadeeasy/certbot_dns_dnsmadeeasy certbot-dns-gehirn/certbot_dns_gehirn certbot-dns-google/certbot_dns_google certbot-dns-linode/certbot_dns_linode certbot-dns-luadns/certbot_dns_luadns certbot-dns-nsone/certbot_dns_nsone certbot-dns-ovh/certbot_dns_ovh certbot-dns-rfc2136/certbot_dns_rfc2136 certbot-dns-route53/certbot_dns_route53 certbot-dns-sakuracloud/certbot_dns_sakuracloud certbot-nginx/certbot_nginx tests/lock_test.py [testenv] @@ -54,7 +54,7 @@ setenv = basepython = {[testenv:oldest]basepython} commands = - {[base]install_and_test} acme[dev] + {[base]install_and_test} acme[test] setenv = {[testenv:oldest]setenv} @@ -62,7 +62,7 @@ setenv = basepython = {[testenv:oldest]basepython} commands = - {[base]pip_install} acme[dev] certbot[dev] certbot-apache + {[base]pip_install} acme[test] certbot[test] certbot-apache pytest certbot-apache setenv = {[testenv:oldest]setenv} @@ -71,7 +71,7 @@ setenv = basepython = {[testenv:oldest]basepython} commands = - {[base]pip_install} acme[dev] certbot[dev] certbot-apache[dev] + {[base]pip_install} acme[test] certbot[test] certbot-apache[dev] pytest certbot-apache setenv = {[testenv:oldest]setenv} @@ -80,7 +80,7 @@ setenv = basepython = {[testenv:oldest]basepython} commands = - {[base]pip_install} acme[dev] certbot[dev] + {[base]pip_install} acme[test] certbot[test] pytest certbot setenv = {[testenv:oldest]setenv} @@ -89,7 +89,7 @@ setenv = basepython = {[testenv:oldest]basepython} commands = - {[base]pip_install} acme[dev] certbot[dev] {[base]dns_packages} + {[base]pip_install} acme[test] certbot[test] {[base]dns_packages} pytest {[base]dns_packages} setenv = {[testenv:oldest]setenv} @@ -98,7 +98,7 @@ setenv = basepython = {[testenv:oldest]basepython} commands = - {[base]pip_install} acme[dev] certbot[dev] certbot-nginx + {[base]pip_install} acme[test] certbot[test] certbot-nginx pytest certbot-nginx python tests/lock_test.py setenv =