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

PEP 517 breaks relative dependency in rustapi_module #362

Closed
pganssle opened this issue Feb 18, 2019 · 5 comments
Closed

PEP 517 breaks relative dependency in rustapi_module #362

pganssle opened this issue Feb 18, 2019 · 5 comments
Labels

Comments

@pganssle
Copy link
Member

pganssle commented Feb 18, 2019

So this is a bit of a problem. With pip >= 19.0 you are automatically opted-in to using PEP 517 if you have a pyproject.toml, and there's no way to get the old behavior of "just install the build dependencies but don't use PEP 517 for the build".

This is a bit of a problem because rustapi_module has an out-of-source dependency on the pyo3 source root, for obvious reasons, but with PEP 517 the build occurs in a temporary build directory.

I don't know enough about how dependencies are specified in Rust to know the right solution here. For now we can disable PEP 517 by removing pyproject.toml.

Reported upstream at pypa/pip#6276 for tracking purposes, though I think we'll probably have to find our own workarounds.

@konstin
Copy link
Member

konstin commented Feb 18, 2019

I'm fine with just removing pyproject.toml for fixing the pyo3 example. For the long term solution (depending on whether this gets fixed in pip itself or not) this issue should be moved to the setuptools-rust repo.

@pganssle
Copy link
Member Author

@konstin It may be that setuptools_rust needs to change to get this working again, but I think this is actually very specific to this repository. In any other repository we wouldn't be specifying an out-of-tree relative dependency. We may want to look into some workarounds.

Playing around with setting the TMPDIR variable I've been able to get the error message to change a bit, but I haven't been able to actually fix it.

@konstin
Copy link
Member

konstin commented Feb 19, 2019

I fully agreed that we should solve the part that affects this repository in this repository. I just wanted to say that depending on pip we might need to split this into two issues where one lives in the setuptools-rust repo.

@davidhewitt
Copy link
Member

Since the very recently released pip 20.1 then builds are now done in-place, so the issue described here is resolved!

@pganssle
Copy link
Member Author

This may need to be revisited at some point. Seems like pip is considering reverting the change to in-tree builds: pypa/pip#7555

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants