Skip to content

Commit

Permalink
temporarily use latest maturin commit to see whether issues are resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
mbway committed Dec 1, 2024
1 parent 6c48ac7 commit 55dd600
Show file tree
Hide file tree
Showing 6 changed files with 872 additions and 431 deletions.
2 changes: 1 addition & 1 deletion src/maturin_import_hook/_building.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def get_maturin_version(maturin_path: Path) -> tuple[int, int, int]:
if not success:
msg = f'running "{maturin_path} --version" failed'
raise MaturinError(msg)
match = re.fullmatch(r"maturin ([0-9]+)\.([0-9]+)\.([0-9]+)\n", output)
match = re.fullmatch(r"maturin ([0-9]+)\.([0-9]+)\.([0-9]+)(-.*)?\n", output)
if match is None:
msg = f'unexpected version string: "{output}"'
raise MaturinError(msg)
Expand Down
11 changes: 11 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ To update maturin:
- update the version check in the import hook to ensure it allows using the new version
- run the tests to ensure everything still works

Released versions of the import hook should use a tagged version of maturin, but during development, in order
to use a specific maturin commit:

- use `maturin @ git+https://github.com/PyO3/maturin@xxxxxxx` in `requirements.txt`
- where `xxxxxxx` is a git commit hash
- `export MATURIN_SETUP_ARGS="--features=scaffolding"` before running `runner.py`
- the `setup.py` of `maturin` uses this environment variable when building from source. the `scaffolding` feature
is required for `maturin new`.
- Make sure a cached built version of this commit is not available because `uv` doesn't know about the
environment variable. run `uv cache clean maturin` to remove any cached versions.

## Notes

### Debugging
Expand Down
Loading

0 comments on commit 55dd600

Please sign in to comment.