Skip to content

Commit

Permalink
Move static-checkers-only dependencies into their dedicated extras (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Aug 23, 2024
2 parents c117671 + 27c258f commit 8e96382
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
13 changes: 5 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,6 @@ test = [
# for tools/finalize.py
'jaraco.develop >= 7.21; python_version >= "3.9" and sys_platform != "cygwin"',
"pytest-home >= 0.5",
# pin mypy version so a new version doesn't suddenly cause the CI to fail,
# until types-setuptools is removed from typeshed.
# For help with static-typing issues, or mypy update, ping @Avasam
"mypy==1.11.*",
# No Python 3.11 dependencies require tomli, but needed for type-checking since we import it directly
"tomli",
# No Python 3.12 dependencies require importlib_metadata, but needed for type-checking since we import it directly
"importlib_metadata",
"pytest-subprocess",

# workaround for pypa/setuptools#4333
Expand Down Expand Up @@ -134,6 +126,11 @@ type = [
"pytest-mypy",

# local

# pin mypy version so a new version doesn't suddenly cause the CI to fail,
# until types-setuptools is removed from typeshed.
# For help with static-typing issues, or mypy update, ping @Avasam
"mypy==1.11.*",
]


Expand Down
5 changes: 2 additions & 3 deletions setuptools/tests/integration/test_pip_install_sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,12 @@ def build_deps(package, sdist_file):
"Manually" install them, since pip will not install build
deps with `--no-build-isolation`.
"""
import tomli as toml

# delay importing, since pytest discovery phase may hit this file from a
# testenv without tomli
from setuptools.compat.py310 import tomllib

archive = Archive(sdist_file)
info = toml.loads(_read_pyproject(archive))
info = tomllib.loads(_read_pyproject(archive))
deps = info.get("build-system", {}).get("requires", [])
deps += EXTRA_BUILD_DEPS.get(package, [])
# Remove setuptools from requirements (and deduplicate)
Expand Down

0 comments on commit 8e96382

Please sign in to comment.