PyO3 / maturin-action

GitHub Action to install and run a custom maturin command with built-in support for cross compilation
MIT License
122 stars 31 forks source link

Windows PyPy fails to find an interpreter #267

Open henryiii opened 1 month ago

henryiii commented 1 month ago

Windows 64-bit PyPy fails to find an interpreter - Linux and macOS (both archs) are fine. Example: https://github.com/tox-dev/pyproject-fmt-rust/pull/11

It works with cibuildwheel, so I think it's an issue with the action.

messense commented 1 month ago

Can you try install them via setup-python action before calling this action?

henryiii commented 1 month ago

Yes, I tried that previously, but I can repeat it in the PR, just a sec.

henryiii commented 1 month ago

Same: https://github.com/tox-dev/pyproject-fmt-rust/actions/runs/9058486065/job/24884203304?pr=11

messense commented 1 month ago

Probably something has changed in github actions tool cache for PyPy.

https://github.com/PyO3/maturin-action/blob/b49dce4c3301c4291fbfb8519934c34dedf502ac/src/index.ts#L769-L779

messense commented 1 month ago

In the meantime you can try enable generate-import-lib feature of pyo3.

See https://pyo3.rs/v0.21.2/features.html?highlight=generate-import-lib#generate-import-lib

henryiii commented 1 month ago

It's in a PyPy folder: https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#hosted-tool-cache

henryiii commented 1 month ago

Assuming this the right way to enable it:

[dependencies]
pyo3 = { version = "0.21.2", features = ["abi3-py38", "generate-import-lib"] }

This cause Maturin to simply ignore the pypy jobs completely and only produce the main wheel. The jobs "passes", but only one wheel is produced. Interestingly, the unix jobs still seem fine and produce PyPy wheels.

messense commented 1 month ago

Interesting, might be a bug in maturin, I'll take a look when I have the time.

henryiii commented 1 month ago

Is there a way for me to see the core.info printouts? I'm still not seeing it with the recent update.

messense commented 1 month ago

core.info should be visible by default, so it's simply didn't run.

https://github.com/tox-dev/pyproject-fmt-rust/actions/runs/9068434736/job/24915732974?pr=11#step:3:34 this one does have the output.