-
Notifications
You must be signed in to change notification settings - Fork 2
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
poetry build
does not include rust .so in wheel
#1
Comments
poetry build
does not include rust .so in wheel
Hi @BartoszJanuszNA, It's been a while since I finished a solution that I think does what you are looking for. Please take a look at: Hope it helps your project! |
The short answer is no, you cannot use poetry build to call maturin build. |
So it seems that until Poetry learns to read dependencies from @RaulTrombin I can see your project's python part does not have any dependencies (I assume @kfields That's exactly what I was suspecting, thanks for resolving my doubts. Well, to be absolutely fair I saw recently a solution using custom Thank you guys! |
Hello, thank you for this tutorial, it was extremely helpful during my project setup. I see one issue with it:
I need to be able to build a wheel for my project and I would like to do it through poetry with maturin as build backend. However, after the wheel produced by
poetry build
command does not include the compiled.so
file.On the contrary, when I use
maturin build
the produced wheel contains the.so
file. So technically I could just usematurin
to build my wheel, right?Well there is a problem - I have to use poetry to manage my dependencies (because of the setup of other projects in out organisation) and
maturin
cannot read dependencies in poetry format ([tool.poetry.dependencies]
) it needs the[project.dependencies]
as PEP 508 specifies. Vice versa, poetry cannot read[project.dependencies]
. So to have both tools working I need to duplicate the dependency list in those two formats, which works but is a pain to maintain.The next interesting thing is, that when I install hello-maturin as the dependency in another project using 'poetry add /path/to/hello-maturin' it installs the complete project - with poetry managed dependencies AND the
.so
file is present insite-packages/hello-maturin
. This shows me that poetry can usematurin
properly as build backend, but for some reason it does not do it duringpoetry build
.So my question is - is there a way to build wheel using
poetry build
withmaturin
as backend and actually have the compiled.so
file included in this wheel?The text was updated successfully, but these errors were encountered: