Skip to content

Commit

Permalink
Handle "v"-prefixed + non-prefixed versions
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Nov 21, 2024
1 parent 92babdb commit d73f71f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ jobs:
# in cibuildwheel/resources/build-platforms.toml.
env:
CIBW_PLATFORM: pyodide
CIBW_PYODIDE_VERSION: "v0.27.0a2"
CIBW_PYODIDE_VERSION: "0.27.0a2"

- name: Run tests with 'CIBW_PLATFORM' set to 'pyodide'
run: |
Expand Down
4 changes: 3 additions & 1 deletion cibuildwheel/pyodide.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def validate_xbuildenv_version(
f"The xbuildenv version {cibw_pyodide_version} is not compatible with the pyodide-build"
f" version {pyodide_build_version}. The compatible versions available to download are:\n"
f"{compatible_versions}. Please use the 'pyodide xbuildenv search' command to"
f" find the compatible versions for {pyodide_build_version}."
f" find the compatible versions for 'pyodide-build' {pyodide_build_version}."
)
raise errors.FatalError(msg)

Expand Down Expand Up @@ -228,6 +228,8 @@ def setup_python(
cibw_pyodide_version = os.environ.get(
"CIBW_PYODIDE_VERSION", python_configuration.pyodide_version
)
# If there's a "v" prefix, remove it: both would be equally valid
cibw_pyodide_version = cibw_pyodide_version.lstrip("v")
log.step(f"Installing Pyodide xbuildenv version: {cibw_pyodide_version} ...")
# Search for compatible xbuildenv versions
compatible_versions = get_xbuildenv_versions(env)
Expand Down

0 comments on commit d73f71f

Please sign in to comment.