-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
python3Packages.ffcv: init at 0.0.3 #160441
Conversation
It's almost working. The package includes a C++ bit that is compiled and linked via distutils called
Anyone have any idea what could be going on here? IIRC @jonringer you mentioned something about this (or maybe it was cython?) a while back? |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/packaging-a-python-library-with-c-distutils-extension/17732/1 |
--replace "'webdataset'," "" | ||
''; | ||
|
||
buildInputs = [ pkgconfig libjpeg ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if pkgconfig the python package should go to nativeBuildInputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean that I should move it to nativeBuildInputs? Or something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think we want to move pkgconfig into nativeBuildInputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving pkgconfig
into nativeBuildInputs
doesn't work unfortunately:
Executing setuptoolsBuildPhase
Traceback (most recent call last):
File "/build/source/nix_run_setup", line 8, in <module>
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
File "setup.py", line 30, in <module>
extension_kwargs = pkgconfig('opencv4', extension_kwargs)
File "setup.py", line 18, in pkgconfig
raise Exception()
Exception
builder for '/nix/store/zsvvs4ispid5s6viwnpvcfl12p3hmzvl-python3.9-ffcv-0.0.3.drv' failed with exit code 1
@SuperSandro2000 any idea how to deal with the |
I think you want something similar to |
Adding preCheck = ''
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
''; still gives me the same errors unfortunately. |
Weirdly enough, |
a7a0a57
to
00dc6dd
Compare
Ok well I updated everything based on the feedback thus far in 00dc6dd. I'll mark as "ready for review" and merge tomorrow unless anyone objects. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/packaging-a-python-library-with-c-distutils-extension/17732/5 |
Motivation for this change
Introduce
python3Packages.ffcv
. FFCV is an exciting new data loading library for computer vision applications.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes