-
-
Notifications
You must be signed in to change notification settings - Fork 453
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
Dependency markers in pyproject.toml aren't used #857
Comments
Indeed we aren't using the markers from To whomever decides to tackle this: The support is implemented in |
And note that to do it properly you need to implement the pubgrub and walk the dependency tree from the pyproject.toml to figure out what packages are actually required. |
No, this is exactly the same pep 508 marker evaluation as we already do for poetry.lock, just in a different spot. |
Yeah it needs to use that evaluator to determine which top-level packages need to be installed, but poetry uses the solver also during installation to figure out which packages in the lock file actually need to get installed. For example, if you have markers to select a package only on windows, then that package might also have transitive dependencies that should only get installed on windows. |
Not working on MacOS while poetry2nix does not implement markers parsing in the pyproject.toml file. See nix-community/poetry2nix#857 and nix-community/poetry2nix#1174.
I figured out a nice way to filter out packages on macOS, pass this as overrides = [
(import ./poetry-overrides.nix)
pkgs.poetry2nix.defaultPoetryOverrides
(self: super: { pyrealsense2 = if self.pkgs.stdenv.isDarwin then null else super.pyrealsense2; })
]; |
Describe the issue
I have a broken test case here: master...bouk:poetry2nix:open3d-markers
Basically, I'm trying to use system markers to install a specific version on a specific platform. These markers aren't emitted into the lockfile (any more?) by poetry so poetry2nix doesn't use them.
I guess poetry itself looks at pyproject.toml to figure out what version to install.
This seems relevant: python-poetry/poetry#3959
Resolution
Looking into this, it seems the strategy poetry2nix currently uses is to just take all the packages in
poetry.lock
and install them, whilepoetry
uses a solver to figure out what to install, even if the lock file doesn't need to change. If poetry2nix is supposed to be fully compatible then we'll have to port that to nix.The text was updated successfully, but these errors were encountered: