Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
}
REQUIREMENTS = {
"docs": "docs/requirements.txt",
"tests": "tests/requirements.txt",
"common-wheels": "tests/requirements-common_wheels.txt",
}

AUTHORS_FILE = "AUTHORS.txt"
Expand All @@ -54,10 +52,10 @@ def should_update_common_wheels() -> bool:
if not os.path.exists(LOCATIONS["common-wheels"]):
return True

# If the requirements was updated after cache, we'll repopulate it.
# If the pyproject.toml was updated after cache, we'll repopulate it.
cache_last_populated_at = os.path.getmtime(LOCATIONS["common-wheels"])
requirements_updated_at = os.path.getmtime(REQUIREMENTS["common-wheels"])
need_to_repopulate = requirements_updated_at > cache_last_populated_at
pyproject_updated_at = os.path.getmtime("pyproject.toml")
need_to_repopulate = pyproject_updated_at > cache_last_populated_at

# Clear the stale cache.
if need_to_repopulate:
Expand All @@ -78,7 +76,7 @@ def test(session: nox.Session) -> None:
session,
"wheel",
"-w", LOCATIONS["common-wheels"],
"-r", REQUIREMENTS["common-wheels"],
"--group", "test-common-wheels",
)
# fmt: on
else:
Expand Down Expand Up @@ -115,7 +113,7 @@ def test(session: nox.Session) -> None:
run_with_protected_pip(session, "install", generated_sdist)

# Install test dependencies
run_with_protected_pip(session, "install", "-r", REQUIREMENTS["tests"])
run_with_protected_pip(session, "install", "--group", "test")

# Parallelize tests as much as possible, by default.
arguments = session.posargs or ["-n", "auto"]
Expand Down
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,36 @@ Changelog = "https://pip.pypa.io/en/stable/news/"
requires = ["setuptools>=77"]
build-backend = "setuptools.build_meta"

[dependency-groups]
test = [
"cryptography",
"freezegun",
"installer",
"pytest",
"pytest-cov",
"pytest-rerunfailures",
"pytest-xdist",
"scripttest",
"setuptools",
# macOS (darwin) arm64 always uses virtualenv >= 20.0
# for other platforms, it depends on python version
"virtualenv < 20.0 ; python_version < '3.10' and (sys_platform != 'darwin' or platform_machine != 'arm64')",
"virtualenv >= 20.0 ; python_version >= '3.10' or (sys_platform == 'darwin' and platform_machine == 'arm64')",
"werkzeug",
"wheel",
"tomli-w",
"proxy.py",
]

test-common-wheels = [
# We pin setuptools<80 because our test suite currently
# depends on setup.py develop to generate egg-link files.
"setuptools >= 40.8.0, != 60.6.0, <80",
"wheel",
# As required by pytest-cov.
"coverage >= 4.4",
]

[tool.setuptools]
package-dir = {"" = "src"}
include-package-data = false
Expand Down
13 changes: 0 additions & 13 deletions tests/requirements-common_wheels.txt

This file was deleted.

17 changes: 0 additions & 17 deletions tests/requirements.txt

This file was deleted.