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
pagmo2, pythonPackages.pygmo refactor fix broken packages #51399
Conversation
@GrahamcOfBorg build pythonPackages.pygmo |
|
||
buildInputs = [ cmake eigen nlopt ipopt boost pagmo2 ]; | ||
propagatedBuildInputs = [ numpy cloudpickle ipyparallel numba ]; | ||
|
||
preBuild = '' | ||
cp -v -r $src/* . | ||
cmake -DCMAKE_INSTALL_PREFIX=$out -DPAGMO_BUILD_TESTS=no -DCMAKE_SYSTEM_NAME=Linux -DPagmo_DIR=${pagmo2} -DPAGMO_BUILD_PYGMO=yes -DPAGMO_BUILD_PAGMO=no -DPAGMO_WITH_EIGEN3=yes -DPAGMO_WITH_NLOPT=yes -DNLOPT_LIBRARY=${nlopt}/lib/libnlopt_cxx.so -DPAGMO_WITH_IPOPT=yes -DIPOPT=${ipopt} | ||
cmake -DCMAKE_INSTALL_PREFIX=$out -DPAGMO_BUILD_TESTS=no -DCMAKE_SYSTEM_NAME=Linux -DPagmo_DIR=${pagmo2} -DPAGMO_BUILD_PYGMO=yes -DPAGMO_BUILD_PAGMO=no -DPAGMO_WITH_EIGEN3=yes -DPAGMO_WITH_NLOPT=yes -DNLOPT_LIBRARY=${nlopt}/lib/libnlopt.so -DPAGMO_WITH_IPOPT=yes |
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'm seeing
CMake Warning:
Manually-specified variables were not used by the project:
PAGMO_BUILD_TESTS
PAGMO_WITH_EIGEN3
PAGMO_WITH_IPOPT
PAGMO_WITH_NLOPT
So I think we can drop those for the pygmo build.
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.
Actually python could become an build output of pagmo2
.
There is a function called toPythonModule
.
Do you know if that works? @dotlambda for outputs of derivation?
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.
Pagmo2 can't build pygmo and itself simultaneously.
See https://github.com/esa/pagmo2/blob/10eff642f2b017c3219e63f41b43cd465d2a83da/CMakeLists.txt#L14
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 know if that works? @dotlambda for outputs of derivation?
It doesn't because it uses overrideAttrs
.
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.
And I think doing anything to use the compilation output of pagmo will fail because we have to compile with different versions of python.
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.
Please also split the lines like this:
cmake -DCMAKE_INSTALL_PREFIX=$out \
-DPAGMO_BUILD_TESTS=no \
-DCMAKE_SYSTEM_NAME=Linux
...
Do you really have to pass CMAKE_SYSTEM_NAME
?
cc @dotlambda |
library nlopt location was wrong. linked pagmo2 and pygmo2 src and version.
ab1df87
to
4e3a564
Compare
I've addressed our feedback and resolved the conflict. @GrahamcOfBorg build pagmo2 pythonPackages.pygmo python3Packages.pygmo python3Packages.dftfit |
This is what I was able to come up with: dotlambda@4d0a561 |
@dotlambda I prefer your solution because it does not use bare cmake commands and instead rely on our cmake support hooks. |
Motivation for this change
Fixed issues with #50645 for merging.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)