You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building a poetry2nix package with git dependencies will fail with something like:
error: builder for '/nix/store/h5j3ida5jjy8k2gvrm4mcm06w09cz6y4-python3.11-smartp-0.1.0.drv' failed with exit code 1;
last 10 log lines:
> Creating a wheel...
> * Getting build dependencies for wheel...
> * Building wheel...
> Successfully built smartp-0.1.0-py3-none-any.whl
> Finished creating a wheel...
> Finished executing pypaBuildPhase
> Running phase: pythonRuntimeDepsCheckHook
> Executing pythonRuntimeDepsCheck
> Checking runtime dependencies for smartp-0.1.0-py3-none-any.whl
> - pysmart not satisfied by version 0.1.dev313
For full logs, run 'nix log /nix/store/h5j3ida5jjy8k2gvrm4mcm06w09cz6y4-python3.11-smartp-0.1.0.drv'.
This is because the generated METADATA file will not have any version specifier when generated from a poetry file pointing to git:
Metadata-Version: 2.1
Name: smartp
Version: 0.1.0
Summary: Blocking test for all SMART capable drives on the system
Author: Jasper Chan
Author-email: jasperchan515@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: pySMART
Description-Content-Type: text/markdown
Describe the bug
Building a
poetry2nix
package with git dependencies will fail with something like:This is because the generated
METADATA
file will not have any version specifier when generated from a poetry file pointing to git:This gets ingested by https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py, eventually causing a failure here due to an empty
requirement.specifier
:nixpkgs/pkgs/development/interpreters/python/hooks/python-runtime-deps-check-hook.py
Lines 81 to 85 in 671803b
Steps To Reproduce
Steps to reproduce the behavior:
nix build
Expected behavior
A clear and concise description of what you expected to happen.
In this case, since there is no version specified in
METADATA
, I would expect the version check to be skipped.Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: