-
Notifications
You must be signed in to change notification settings - Fork 5
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
BLD: Scipy meson build with Nix #41
base: meson
Are you sure you want to change the base?
Conversation
This should be dynamically generated later, but for now we need these to be able to import scipy and run the tests.
Also a few tweaks to mesondev.sh
Note, in the distutils build we seem to want to dynamically choose between c++11 and c++14, see `set_cxx_flags_hook` usage. Meson by default seems to choose c++17, or the highest that's available locally.
These have been here for years, and it seems we don't want to fix them.
scipy/signal was interfering with an import (it was hiding stdlib `signal`)
All tests that are run now pass again
* added minpack in optimize/meson.build * added compiler flags * corrected compiler flags * added rootfind to meson.build * removed redundant flag handling for compilers * lbfgsb_module compiling with meson and ninja * removed redundant dependency * moduleTNC, cobyla working * added slsqp to meson.build * removed flags for c/cpp warnings * added __nnls, _group_columns * pythran handling changed * pythran working in optimize * added _bglu_dense * everything complete except _highs * added _highs and removed cythonize * fixed cython_optimize build * Added new lines * WIP: disable building extensions that depend on cython_blas/lapack This doesn't work well yet, depends on the "structured sources" Meson PR. Until then we can have it a little (like done for `cython_blas` itself), but let's not spend much time on that now - rather wait for that PR to land. Co-authored-by: Ralf Gommers <[email protected]>
MAINT: Removed `Wno-cpp` flags
Fix many Meson build issues, mostly with Cython
The implementation is buggy (see scipy#2877), and this test is failing with Meson
@@ -6,7 +6,7 @@ if meson.get_compiler('cpp', native: true).sizeof('void*') > 4 | |||
endif | |||
|
|||
include = include_directories('include') | |||
inc_boost = include_directories('..' / '..' / '_lib' / 'boost') | |||
boost_dep = dependency('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.
Note that https://github.com/scipy/boost-headers-only is at Boost 1.75. Boost 1.76 was broken in a way that was not easy to figure out. If you want to do this unbundling (also in nixpkgs) then please use 1.75.0
.
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.
Right, the intention is indeed to unbundle. I think the patch can be mainlined if a fallback is specified, but I have not tried that yet.
The stars are aligning enough that I've been learning a bit of Nix over the past days. My time is limited, but I think I should be able to wrap my head around this PR at some point. |
This commit adds a Nix flake for building scipy with Nix. Note flakes are an experimental Nix feature.
For some reason we get the following issue when running the build inside a nix-build: scipy/linalg/tests/meson.build:27:4: ERROR: File test_lapack.py does not exist.
Declare boost as a dependency, instead of referring to its include directories. This is more portable.
Flake input changes: * Updated 'nixpkgs': 'github:nixos/nixpkgs/979ac3960d14ff816bd364b0046949a182700755' -> 'github:nixos/nixpkgs/fb7a4364eed25089dab218c811e26bda7ad91b00'
Flake input changes: * Updated 'nixpkgs': 'github:nixos/nixpkgs/fb7a4364eed25089dab218c811e26bda7ad91b00' -> 'github:nixos/nixpkgs/1c586291425a2e2c5683db88a829dbc419f23e45'
Flake input changes: * Updated 'nixpkgs': 'github:nixos/nixpkgs/1c586291425a2e2c5683db88a829dbc419f23e45' -> 'github:nixos/nixpkgs/2888e46885d6b5ff6463d69c5884c1069891d066'
Flake input changes: * Updated 'nixpkgs': 'github:nixos/nixpkgs/2888e46885d6b5ff6463d69c5884c1069891d066' -> 'github:nixos/nixpkgs/b18b496a6349cfe11a4a3d1d56fe16558b9b96eb'
0704d6a
to
7deaf3e
Compare
Reference issue
What does this implement/fix?
Demonstrate how to perform a Nix build of the meson version of scipy.
Additional information
Note there is no intention of me on getting this merged; I just like to demo how it works and see if we run into any issues already at this point.