File tree Expand file tree Collapse file tree 2 files changed +9
-23
lines changed Expand file tree Collapse file tree 2 files changed +9
-23
lines changed Original file line number Diff line number Diff line change @@ -163,12 +163,10 @@ def test_install_fails_if_extra_at_end(
163
163
"Hop_hOp-hoP" ,
164
164
"hop-hop-hop" ,
165
165
marks = pytest .mark .xfail (
166
- "sys.version_info < (3, 8)" ,
167
166
reason = (
168
167
"matching a normalized extra request against an"
169
168
"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)."
172
170
),
173
171
),
174
172
),
@@ -180,26 +178,18 @@ def test_install_special_extra(
180
178
specified_extra : str ,
181
179
requested_extra : str ,
182
180
) -> 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" ]},
197
187
)
198
188
199
189
result = script .pip (
200
190
"install" ,
201
191
"--no-index" ,
202
- f"{ pkga_path } [{ requested_extra } ]" ,
192
+ f"pkga [{ requested_extra } ] @ { pkga_path . as_uri () } " ,
203
193
expect_error = True ,
204
194
)
205
195
assert (
Original file line number Diff line number Diff line change 5
5
# 4. Replacing the `setuptools` entry below with a `file:///...` URL
6
6
# (Adjust artifact directory used based on preference and operating system)
7
7
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
12
9
wheel
13
-
14
10
# As required by pytest-cov.
15
11
coverage >= 4.4
You can’t perform that action at this time.
0 commit comments