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 wheel url support #1298

Merged
merged 8 commits into from
Oct 28, 2023
Merged

Conversation

Pegasust
Copy link
Contributor

Fixes #1239

This adds support for pyproject.toml that has url with .whl and built with preferWheels = true.

[tool.poetry.dependencies]
my-complex-package = {url = "https://github.com/nix-user/complex-package/releases/download/complex-3.6.0/my-complex-package-3.6.0-py3-none-any.whl"}

poetry2nix's previous behavior reinstalls (by fetching from the specified url) the wheel AFTER the dependencies (including the wheel-via-url) are resolved and patched onto the Python environment from unerased wheel dependency from pyproject This is from pipInstallHook running at installPhase.

pythonPackages.pipInstallHook

We are relaxing this install phase by having pyproject accept any version of the installed package, which should become a no-op because our materialized python already has this dependency attached with a dependencies hook within other special dep hooks that we already have.

On the topic of data science packages, we did also discover potentially unintended behavior with pytorch from #1109. We seem to require libcuda to be installed/managed separately, since ml-stack and use-url-wheel tests go through correctly in Darwin (which doesn't require CUDA!), but fails at x86_64 CI. I did added a HACK stanza on skipping this part of integration test.

@adisbladis adisbladis merged commit 177fad8 into nix-community:master Oct 28, 2023
121 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mkPoetryApplication fails during installation phase when using dependency from URL
3 participants