Skip to content

Commit 5de10e8

Browse files
authored
Merge pull request #1096 from woodruffw-forks/ww/fix-integration
test_integration: allow PEP 625 sdist name
2 parents 48af4c1 + 43ad554 commit 5de10e8

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

tests/test_integration.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,15 @@ def sampleproject_dist(tmp_path_factory: pytest.TempPathFactory):
4848
run([sys.executable, "-m", "build", "--sdist"], cwd=checkout)
4949

5050
[dist, *_] = (checkout / "dist").glob("*")
51-
assert dist.name == f"twine-sampleproject-3.0.0.post{tag}.tar.gz"
51+
# NOTE: newer versions of setuptools (invoked via build) adhere to PEP 625,
52+
# causing the dist name to be `twine_sampleproject` instead of
53+
# `twine-sampleproject`. Both are allowed here for now, but the hyphenated
54+
# version can be removed eventually.
55+
# See: https://github.com/pypa/setuptools/issues/3593
56+
assert dist.name in (
57+
f"twine-sampleproject-3.0.0.post{tag}.tar.gz",
58+
f"twine_sampleproject-3.0.0.post{tag}.tar.gz",
59+
)
5260

5361
return dist
5462

tox.ini

+5-1
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,17 @@ commands =
7979
[testenv:types]
8080
deps =
8181
mypy
82-
lxml
82+
# required for report generation. 5.2.1 is forbidden due to an observed
83+
# broken wheel on CPython 3.8:
84+
# https://bugs.launchpad.net/lxml/+bug/2064158
85+
lxml >= 5.2.0, != 5.2.1
8386
# required for more thorough type declarations
8487
keyring >= 22.3
8588
# consider replacing with `mypy --install-types` when
8689
# https://github.com/python/mypy/issues/10600 is resolved
8790
types-requests
8891
commands =
92+
pip list
8993
mypy --html-report mypy --txt-report mypy {posargs:twine}
9094
python -c 'with open("mypy/index.txt") as f: print(f.read())'
9195

0 commit comments

Comments
 (0)