-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Switch to maturin. #8815
Switch to maturin. #8815
Conversation
TODO before mergable:
|
0ed4d74
to
78c881c
Compare
Hey, maturin's sdist support is be a bit hacky so you may run into obscure problems, feel free to ping me or open an issue if something doesn't work. |
Thanks!
…On Thu, Apr 27, 2023 at 12:46 AM messense ***@***.***> wrote:
Hey, maturin's sdist support is be a bit hacky
<https://github.com/PyO3/maturin/issues?q=is%3Aissue+is%3Aopen+label%3Asdist>
so you may run into obscure problems, feel free to ping me or open an issue
if something doesn't work.
—
Reply to this email directly, view it on GitHub
<#8815 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBB6XJP36EAGJRCWNK3XDH23ZANCNFSM6AAAAAAXKGUW3Y>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
All that is necessary for evil to succeed is for good people to do nothing.
|
@messense is there a way to disable the rewriting things to be |
No way ATM, I do want to support it to avoid PyO3/maturin#1442. |
Would it be useful to file a bug for that, or should I just follow 1442?
…On Tue, May 2, 2023 at 3:05 AM messense ***@***.***> wrote:
is there a way to disable the rewriting things to be local_dependencies?
No way ATM, I do want to support it to avoid PyO3/maturin#1442
<PyO3/maturin#1442>.
—
Reply to this email directly, view it on GitHub
<#8815 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAAGBDG2335LUKBOQ772SLXECWZZANCNFSM6AAAAAAXKGUW3Y>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
All that is necessary for evil to succeed is for good people to do nothing.
|
Yeah, file a bug is useful. |
@messense Is it intentional that maturin doesn't set the Specifically, this is happening when |
I think it has something to do with abi3, we can certainly pass down the interpreter path if it's specified. I can take a look this weekend. |
Thanks! |
1592: Always set `PYO3_PYTHON` if interpreter is runnable regardless of abi3 r=messense a=messense It can be useful in build scripts, like pyca/cryptography#8815 (comment) Co-authored-by: messense <messense@icloud.com>
1592: Always set `PYO3_PYTHON` if interpreter is runnable regardless of abi3 r=messense a=messense It can be useful in build scripts, like pyca/cryptography#8815 (comment) Co-authored-by: messense <messense@icloud.com>
1592: Always set `PYO3_PYTHON` if interpreter is runnable regardless of abi3 r=messense a=messense It can be useful in build scripts, like pyca/cryptography#8815 (comment) Co-authored-by: messense <messense@icloud.com>
Please try maturin 1.0.0b9. |
Ok, we are green here, huzzah! The remaining things we need are: a) Maturin stable release (this currently uses a beta), b) @reaperhulk we need to discuss MSRV implications: maturin currently has an MSRV of 1.64, which is obviously higher than our MSRV. It also has wheels for every possible platform it seems, https://pypi.org/project/maturin/1.0.0b9/#files |
After discussion with @reaperhulk, we think the MSRV is too aggressive. Going to hold this in draft for now. |
d65784b
to
3fd7767
Compare
5c13ed1
to
78f9e71
Compare
7bb47e8
to
0f22527
Compare
dc027af
to
dc1924e
Compare
It seems to be much faster at doing things locally.
This is probably worth a release note? (and should be remilestoned to 43?) |
There's no public API implicated here -- the only installation method we have ever documented support for is pip (and perhaps by extension other installers that are PEP517 compatible). Good catch re:milestone though. |
Your call of course. There are cases where someone might hit this (e.g. installation without build isolation, as distributors are wont to do), but it's not hard to find out and fix. Still, I'd tend to add it for completeness 🤷♂️ |
Am I correct in understanding that now maturin is used it is no longer possible to build non-abi3 wheels if you're building locally for a single python version? |
I think it may be possible with If there's something we can do to improve this, let us know. |
It assumed it did work before, because when you simply run the build backend without any particular options, the previous version installed /usr/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust.cpython-312-x86_64-linux-gnu.so whereas the new version installs /usr/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust.abi3.so I futzed around a bit in the current source, and was able to convince maturin to build As far as I can tell, it's not actually possible to disable a single feature in cargo, though there's an open issue from 2016 asking for the ability. (?) I know when I helped someone implement Limited API support in meson, the resulting implementation took:
which I figured was a good balance. |
It appears this is set in pyproject.toml anyway. 🤷 If I try to remove it on its own, maturin spawns an error message:
|
Hmm, it feels like maybe we need a knob in maturin to make this easier.
…On Sun, Aug 11, 2024 at 12:39 PM Eli Schwartz ***@***.***> wrote:
I think it may be possible with build-args (ala https://github.com/pyca/cryptography/blob/main/.github/workflows/wheel-builder.yml#L130), by simply not setting abi3.
It appears this is set in pyproject.toml anyway. 🤷 If I try to remove it on its own, maturin spawns an error message:
💥 maturin failed
Caused by: You have selected the `abi3` feature but not a minimum version (e.g. the `abi3-py36` feature). maturin needs a minimum version feature to build abi3 wheels.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
--
All that is necessary for evil to succeed is for good people to do nothing.
|
It seems to be much faster at doing things locally.