Skip to content

Commit 274d985

Browse files
committed
remove support for {python} and {pip} in commands
1 parent 875fb56 commit 274d985

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
@@ -186,12 +186,12 @@ def format_safe(template: str, **kwargs: str | os.PathLike[str]) -> str:
186186

187187
def prepare_command(command: str, **kwargs: PathOrStr) -> str:
188188
"""
189-
Preprocesses a command by expanding variables like {python}.
189+
Preprocesses a command by expanding variables like {project}.
190190
191191
For example, used in the test_command option to specify the path to the
192192
project's root. Unmatched syntax will mostly be allowed through.
193193
"""
194-
return format_safe(command, python="python", pip="pip", **kwargs)
194+
return format_safe(command, **kwargs)
195195

196196

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

0 commit comments

Comments
 (0)