Skip to content

Commit 90c4a42

Browse files
committed
Manually build package and revert xfail marker
1 parent 99bea32 commit 90c4a42

File tree

2 files changed

+9
-23
lines changed

2 files changed

+9
-23
lines changed

tests/functional/test_install_extras.py

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,10 @@ def test_install_fails_if_extra_at_end(
163163
"Hop_hOp-hoP",
164164
"hop-hop-hop",
165165
marks=pytest.mark.xfail(
166-
"sys.version_info < (3, 8)",
167166
reason=(
168167
"matching a normalized extra request against an"
169168
"unnormalized extra in metadata requires PEP 685 support "
170-
"in either packaging or the build tool. Setuptools "
171-
"implements this in 68.2, which requires 3.8+"
169+
"in packaging (see pypa/pip#11445)."
172170
),
173171
),
174172
),
@@ -180,26 +178,18 @@ def test_install_special_extra(
180178
specified_extra: str,
181179
requested_extra: str,
182180
) -> None:
183-
# Check that uppercase letters and '-' are dealt with
184-
# make a dummy project
185-
pkga_path = script.scratch_path / "pkga"
186-
pkga_path.mkdir()
187-
pkga_path.joinpath("setup.py").write_text(
188-
textwrap.dedent(
189-
f"""
190-
from setuptools import setup
191-
setup(name='pkga',
192-
version='0.1',
193-
extras_require={{'{specified_extra}': ['missing_pkg']}},
194-
)
195-
"""
196-
)
181+
"""Check extra normalization is implemented according to specification."""
182+
pkga_path = create_basic_wheel_for_package(
183+
script,
184+
name="pkga",
185+
version="0.1",
186+
extras={specified_extra: ["missing_pkg"]},
197187
)
198188

199189
result = script.pip(
200190
"install",
201191
"--no-index",
202-
f"{pkga_path}[{requested_extra}]",
192+
f"pkga[{requested_extra}] @ {pkga_path.as_uri()}",
203193
expect_error=True,
204194
)
205195
assert (

tests/requirements-common_wheels.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@
55
# 4. Replacing the `setuptools` entry below with a `file:///...` URL
66
# (Adjust artifact directory used based on preference and operating system)
77

8-
# Implements new extra normalization.
9-
setuptools >= 68.2 ; python_version >= '3.8'
10-
setuptools >= 40.8.0, != 60.6.0 ; python_version < '3.8'
11-
8+
setuptools >= 40.8.0, != 60.6.0
129
wheel
13-
1410
# As required by pytest-cov.
1511
coverage >= 4.4

0 commit comments

Comments
 (0)