-
Notifications
You must be signed in to change notification settings - Fork 783
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
Integration with poetry's pyproject.toml #953
Comments
I've made an example repo that mimics my project's organization: https://github.com/nbigaouette/python-poetry-rust-wheel/tree/80496bf38e1d6b7a0218341338a6db0c0c7b5634 Running |
Integration with |
Yes I asked @nbigaouette to open the issue here; I'll move it where I think is appropriate at the weekend. |
poetry can run build python build scripts, see e.g. pendulum.
The readme specifically explains how to build mixed projects. As long as poetry's plugin interface is not finished and there is not standardized way to specify dependencies (https://discuss.python.org/t/pep-621-how-to-specify-dependencies/4599), I expect that you will have to duplicate at least the dependencies between poetry and any other tool, maybe even other metadata (until PEP 621 is widely used) and won't be able to use |
I'm going to close this question as I think @konstin 's answer is very good and there's not much we can do here in pyO3 for now. Thanks for the question and answers all! |
It may be worth quickly mentioning that Maturin is a headache for Nix in the same way that Poetry is a godsend. Maturin is very reliant on procedural modifications of venvs compared to something Cargo or Poetry where everything is controlled by a requirements file and a separate lockfile. As a result, installing |
@saolof please don't comment on closed issues with new problems, if there is a specific thing that doesn't work please open an issue in the maturin repo with instructions to reproduce the problems and we we'll try to make your usecase work. |
There is something I want to achieve but I am unsure as to what is the best approach. I was suggested on Gitter to post my usecase here in the hope of coming up with an example solution.
I have a current 100% Python project that is managed using poetry. It uses a
pyproject.toml
file to manage the project's dependencies.Also, this project is deployed to an internal pypy repository using
poetry publish --repository internalpypy
as a wheel that gets pulled down by other projects (themselves using poetry too).I would like to port one function of the Python project to Rust since it is quite heavy. I want to minimize changes to the project's organization. As such, how can I introduce the rust code to be built and included in the final wheel using only
poetry build
(andpoetry publish
)?I did worked previously with
milksnake
but unfortunately:setup.py
file to be configured properly but poetry'spyproject.toml
replaces thesetup.py
file).I checked
maturin
but:Some poetry related issues I've found when searching this:
I am looking at
setuptools-rust
right now.Thanks!
The text was updated successfully, but these errors were encountered: