Skip to content

Commit

Permalink
remove support for {python} and {pip} in commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Nov 25, 2024
1 parent d52123e commit e1112fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cibuildwheel/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,10 @@ def detect_warnings(*, options: Options, identifiers: Iterable[str]) -> list[str
if any(o and ("{python}" in o or "{pip}" in o) for o in option_values):
# Reminder: in an f-string, double braces means literal single brace
msg = (
f"{option_name}: '{{python}}' and '{{pip}}' are no longer needed, "
"and will be removed in cibuildwheel 3. Simply use 'python' or 'pip' instead."
f"{option_name}: '{{python}}' and '{{pip}}' are no longer supported "
"and have been removed in cibuildwheel 3. Simply use 'python' or 'pip' instead."
)
warnings.append(msg)
raise errors.ConfigurationError(msg)

return warnings

Expand Down
4 changes: 2 additions & 2 deletions cibuildwheel/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,12 @@ def format_safe(template: str, **kwargs: str | os.PathLike[str]) -> str:

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


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

0 comments on commit e1112fe

Please sign in to comment.