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
Avasam committed Aug 22, 2024
1 parent c117671 commit 93de877
Show file tree
Hide file tree
Showing 2 changed files with 10 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
8 changes: 5 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,15 @@ 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
if sys.version_info >= (3, 11):
import tomllib
else: # pragma: no cover
import tomli as 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 93de877

Please sign in to comment.