PyO3 / maturin-action

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

Allow specifying maturin version by git commit/branch #228

Open stinodego opened 7 months ago

stinodego commented 7 months ago

The maturin action only supports tagged releases, as documented in the README.

Recently, I ran into a bug and wanted to use the latest commit on the main branch to build my project. However, this is not currently possible. I have the git branch specified in my pyproject.toml:

[build-system]
requires = ["maturin @ git+https://github.com/PyO3/maturin.git@main"]
build-backend = "maturin"

Maturin action recognized this, but doesn't allow it and installs the latest released version (which does not include the fix I require).

Found maturin version requirement maturin @ git+https://github.com/PyO3/maturin.git@main specified in pyproject.toml
Warning: No maturin release found from requirement maturin @ git+https://github.com/PyO3/maturin.git@main, fallback to latest

It would be great if we could at least use the latest version on the main branch. Though I understand this may be hard to support.

messense commented 7 months ago

Well, I guess it's not that hard to support, we could translate that into pip install https://github.com/PyO3/maturin/archive/refs/heads/<git-rev>.zip, but it's gonna be slow because it will compile maturin from source.