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
Enh/boost with numpy extension #32414
Conversation
@@ -23,7 +23,7 @@ in | |||
''; | |||
|
|||
buildInputs = [ | |||
libpng python3 (boost.override { python = python3; }) | |||
libpng python3Packages.python python3Packages.boost |
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.
use python3.pkgs.python and python3.pkgs.boost. No need to make the change everywhere.
@@ -10,7 +10,7 @@ | |||
, enablePIC ? false | |||
, enableExceptions ? false | |||
, enablePython ? hostPlatform == buildPlatform | |||
, enableNumpy ? false, numpy ? null | |||
, enableNumpy ? true |
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.
This should default to false. numpy/openblas/gfortran is a bit too much for a default boost installation.
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.
numpy is required starting 1.65 because as you can read in the release notes:
The boost::python::numeric API has been removed, as it is being obsoleted by boost::python::numpy.
Without numpy extension, it is not possible to manipulate Python array types anymore.
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.
Numpy doesn't seem to end up in the closure, so that's good. Its just needed during build-time.
Older versions do not require numpy
, so can you put this in the function call of 1.65.nix
.
0662437
to
e532c89
Compare
@FRidh I took your remarks into account, and took the liberty to squashes the changes. |
Hello @FRidh |
Hello @FRidh |
Pushed to staging 19dbfb6. |
This has a problem in that turns on numpy even when Python is disabled;
And Python is disabled by default when cross building meaning this can cause quite a lot of errors. |
Motivation for this change
Build Boost numpy Python by default.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)