Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for invoking with python3 -m maturin #1008

Merged
merged 1 commit into from
Jul 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ jobs:
if: steps.changes.outputs.changed == 'true'
- run: maturin --version
if: steps.changes.outputs.changed == 'true'
- run: python3 -m maturin --version
if: steps.changes.outputs.changed == 'true'
- name: Upload wheel artifacts
if: steps.changes.outputs.changed == 'true'
uses: actions/upload-artifact@v2
Expand Down
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

* Add 64-bit RISC-V support by felixonmars in [#1001](https://github.com/PyO3/maturin/pull/1001)
* Add support for invoking with `python3 -m maturin` in [#1008](https://github.com/PyO3/maturin/pull/1008)

## [0.13.0] - 2022-07-09

Expand Down
9 changes: 9 additions & 0 deletions maturin/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import os
import sys
from pathlib import Path
import sysconfig

if __name__ == "__main__":
scripts_dir = sysconfig.get_path("scripts")
maturin = Path(scripts_dir) / "maturin"
os.execv(maturin, [str(maturin)] + sys.argv[1:])