in-progress uv lowest setup

This commit is contained in:
Erica Portnoy 2025-08-19 10:55:13 -07:00
parent 00a51ab22b
commit 03f28941fc
7 changed files with 120 additions and 11 deletions

86
-- Normal file
View file

@ -0,0 +1,86 @@
acme/pyproject.toml:requires = ["setuptools"]
acme/pyproject.toml:build-backend = "setuptools.build_meta"
acme/pyproject.toml:[tool.setuptools]
acme/pyproject.toml:[tool.setuptools.packages.find]
certbot-apache/pyproject.toml:requires = ["setuptools"]
certbot-apache/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-apache/pyproject.toml:[tool.setuptools]
certbot-apache/pyproject.toml:[tool.setuptools.packages.find]
certbot-ci/pyproject.toml:requires = ["setuptools"]
certbot-ci/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-ci/pyproject.toml:[tool.setuptools]
certbot-ci/pyproject.toml:[tool.setuptools.packages.find]
certbot-compatibility-test/pyproject.toml:requires = ["setuptools"]
certbot-compatibility-test/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-compatibility-test/pyproject.toml:[tool.setuptools]
certbot-compatibility-test/pyproject.toml:[tool.setuptools.packages.find]
certbot-dns-cloudflare/pyproject.toml:requires = ["setuptools"]
certbot-dns-cloudflare/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-dns-cloudflare/pyproject.toml:[tool.setuptools]
certbot-dns-cloudflare/pyproject.toml:[tool.setuptools.packages.find]
certbot-dns-digitalocean/pyproject.toml:requires = ["setuptools"]
certbot-dns-digitalocean/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-dns-digitalocean/pyproject.toml:[tool.setuptools]
certbot-dns-digitalocean/pyproject.toml:[tool.setuptools.packages.find]
certbot-dns-dnsimple/pyproject.toml:requires = ["setuptools"]
certbot-dns-dnsimple/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-dns-dnsimple/pyproject.toml:[tool.setuptools]
certbot-dns-dnsimple/pyproject.toml:[tool.setuptools.packages.find]
certbot-dns-dnsmadeeasy/pyproject.toml:requires = ["setuptools"]
certbot-dns-dnsmadeeasy/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-dns-dnsmadeeasy/pyproject.toml:[tool.setuptools]
certbot-dns-dnsmadeeasy/pyproject.toml:[tool.setuptools.packages.find]
certbot-dns-gehirn/pyproject.toml:requires = ["setuptools"]
certbot-dns-gehirn/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-dns-gehirn/pyproject.toml:[tool.setuptools]
certbot-dns-gehirn/pyproject.toml:[tool.setuptools.packages.find]
certbot-dns-google/pyproject.toml:requires = ["setuptools"]
certbot-dns-google/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-dns-google/pyproject.toml:[tool.setuptools]
certbot-dns-google/pyproject.toml:[tool.setuptools.packages.find]
certbot-dns-linode/pyproject.toml:requires = ["setuptools"]
certbot-dns-linode/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-dns-linode/pyproject.toml:[tool.setuptools]
certbot-dns-linode/pyproject.toml:[tool.setuptools.packages.find]
certbot-dns-luadns/pyproject.toml:requires = ["setuptools"]
certbot-dns-luadns/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-dns-luadns/pyproject.toml:[tool.setuptools]
certbot-dns-luadns/pyproject.toml:[tool.setuptools.packages.find]
certbot-dns-nsone/pyproject.toml:requires = ["setuptools"]
certbot-dns-nsone/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-dns-nsone/pyproject.toml:[tool.setuptools]
certbot-dns-nsone/pyproject.toml:[tool.setuptools.packages.find]
certbot-dns-ovh/pyproject.toml:requires = ["setuptools"]
certbot-dns-ovh/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-dns-ovh/pyproject.toml:[tool.setuptools]
certbot-dns-ovh/pyproject.toml:[tool.setuptools.packages.find]
certbot-dns-rfc2136/pyproject.toml:requires = ["setuptools"]
certbot-dns-rfc2136/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-dns-rfc2136/pyproject.toml:[tool.setuptools]
certbot-dns-rfc2136/pyproject.toml:[tool.setuptools.packages.find]
certbot-dns-route53/pyproject.toml:requires = ["setuptools"]
certbot-dns-route53/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-dns-route53/pyproject.toml:[tool.setuptools]
certbot-dns-route53/pyproject.toml:[tool.setuptools.packages.find]
certbot-dns-sakuracloud/pyproject.toml:requires = ["setuptools"]
certbot-dns-sakuracloud/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-dns-sakuracloud/pyproject.toml:[tool.setuptools]
certbot-dns-sakuracloud/pyproject.toml:[tool.setuptools.packages.find]
certbot-nginx/pyproject.toml:requires = ["setuptools"]
certbot-nginx/pyproject.toml:build-backend = "setuptools.build_meta"
certbot-nginx/pyproject.toml:[tool.setuptools]
certbot-nginx/pyproject.toml:[tool.setuptools.packages.find]
certbot/pyproject.toml:requires = ["setuptools"]
certbot/pyproject.toml:build-backend = "setuptools.build_meta"
certbot/pyproject.toml: # poetry 1.2.0+ is required for it to pin pip, setuptools, and wheel. See
certbot/pyproject.toml: "setuptools",
certbot/pyproject.toml: "types-setuptools",
certbot/pyproject.toml:[tool.setuptools]
certbot/pyproject.toml:[tool.setuptools.packages.find]
certbot/pyproject.toml:[tool.setuptools.dynamic]
letstest/pyproject.toml:requires = ["setuptools"]
letstest/pyproject.toml:build-backend = "setuptools.build_meta"
letstest/pyproject.toml:[tool.setuptools.packages.find]
tools/pinning/current/pyproject.toml:# setuptools-rust is a build dependency of cryptography, and since we don't have
tools/pinning/current/pyproject.toml:# working version. Note: if build dependencies of setuptools-rust break at some
tools/pinning/current/pyproject.toml:setuptools-rust = "*"

View file

@ -30,7 +30,7 @@ dependencies = [
# 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",
"pyrfc3339>=2.0.1",
"requests>=2.25.1",
]

View file

@ -8,7 +8,7 @@ install_requires = [
# https://github.com/certbot/certbot/issues/8761 for more info.
f'acme>={version}',
f'certbot>={version}',
'python-augeas',
'python-augeas>=0.5.0',
]
setup(

View file

@ -53,14 +53,14 @@ docs = [
# Tools like pip, wheel, and tox are listed here to ensure they are properly
# pinned and installed during automated testing.
test = [
"coverage",
"mypy",
"coverage>=5.1",
"mypy>=0.942",
"pip",
"pylint",
"pytest",
"pytest-cov",
"pytest-xdist",
"ruff",
"pylint>=2.16.2",
"pytest>=8.4.1", # https://github.com/pytest-dev/pytest/discussions/9195
"pytest-cov>=6.2.1",
"pytest-xdist>=1.12",
"ruff>=0.0.291",
"setuptools",
"tox",
"types-httplib2",

View file

@ -128,6 +128,7 @@ SetVersion "$version"
# Unset CERTBOT_OLDEST to prevent wheels from being built improperly due to
# conditionals like the one found in certbot-dns-dnsimple's setup.py file.
unset CERTBOT_OLDEST
unset CERTBOT_LOWEST
echo "Preparing sdists and wheels"
for pkg_dir in $SUBPKGS
do

View file

@ -29,7 +29,10 @@ def call_with_print(command, env):
def uv_install_with_print(args_str, env):
command = ['"', sys.executable, '" -m uv pip install ', args_str]
if os.environ.get('CERTBOT_LOWEST') == '1':
command = ['"', sys.executable, '" -m uv pip install --resolution lowest-direct ', args_str]
else:
command = ['"', sys.executable, '" -m uv pip install ', args_str]
call_with_print(''.join(command), env=env)
def pip_install_with_print(args_str, env):
@ -38,6 +41,10 @@ def pip_install_with_print(args_str, env):
def pip_constrained_environ():
env = os.environ.copy()
if os.environ.get('CERTBOT_LOWEST') == '1':
return env
tools_path = find_tools_path()
repo_path = os.path.dirname(tools_path)
@ -48,7 +55,6 @@ def pip_constrained_environ():
constraints_path = os.path.normpath(os.path.join(
repo_path, 'tools', 'requirements.txt'))
env = os.environ.copy()
# We set constraints for pip using an environment variable so that they
# are also used when installing build dependencies. See
# https://github.com/certbot/certbot/pull/8443 for more info.

16
tox.ini
View file

@ -71,6 +71,22 @@ setenv =
CERTBOT_OLDEST=1
commands = {[testenv:py]commands}
[testenv:lowest]
# Setting basepython allows the tests to fail fast if that version of Python
# isn't available instead of potentially trying to use a newer version of
# Python which is unlikely to work.
#
# This version should be kept in sync with the one declared in
# tools/pinning/oldest/pyproject.toml.
basepython = python3.10
setenv =
{[testenv:py]setenv}
CERTBOT_LOWEST=1
commands =
uv pip install pipdeptree
pipdeptree -fl
{[testenv:py]commands}
[testenv:cover]
coverage_report = python -m coverage report
common_coverage_report_commands =