Skip to content

Commit b679396

Browse files
committed
remove support for {python} and {pip} in commands
1 parent 71b0f3c commit b679396

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cibuildwheel/__main__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,10 +417,10 @@ def detect_warnings(*, options: Options, identifiers: Iterable[str]) -> list[str
417417
if any(o and ("{python}" in o or "{pip}" in o) for o in option_values):
418418
# Reminder: in an f-string, double braces means literal single brace
419419
msg = (
420-
f"{option_name}: '{{python}}' and '{{pip}}' are no longer needed, "
421-
"and will be removed in cibuildwheel 3. Simply use 'python' or 'pip' instead."
420+
f"{option_name}: '{{python}}' and '{{pip}}' are no longer supported "
421+
"and have been removed in cibuildwheel 3. Simply use 'python' or 'pip' instead."
422422
)
423-
warnings.append(msg)
423+
raise errors.ConfigurationError(msg)
424424

425425
return warnings
426426

cibuildwheel/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,12 @@ def format_safe(template: str, **kwargs: str | os.PathLike[str]) -> str:
219219

220220
def prepare_command(command: str, **kwargs: PathOrStr) -> str:
221221
"""
222-
Preprocesses a command by expanding variables like {python}.
222+
Preprocesses a command by expanding variables like {project}.
223223
224224
For example, used in the test_command option to specify the path to the
225225
project's root. Unmatched syntax will mostly be allowed through.
226226
"""
227-
return format_safe(command, python="python", pip="pip", **kwargs)
227+
return format_safe(command, **kwargs)
228228

229229

230230
def get_build_verbosity_extra_flags(level: int) -> list[str]:

0 commit comments

Comments
 (0)