Merge pull request #279317 from doronbehar/pkg/matplotlib
python310Packages.matplotlib: multiple cleanup commits
This commit is contained in:
@@ -6,10 +6,8 @@
|
||||
, isPyPy
|
||||
, pythonOlder
|
||||
|
||||
# https://github.com/matplotlib/matplotlib/blob/main/doc/devel/dependencies.rst
|
||||
# build-system
|
||||
, certifi
|
||||
, oldest-supported-numpy
|
||||
, pkg-config
|
||||
, pybind11
|
||||
, setuptools
|
||||
@@ -109,19 +107,11 @@ buildPythonPackage rec {
|
||||
substituteInPlace src/_c_internal_utils.c \
|
||||
--replace libX11.so.6 ${libX11}/lib/libX11.so.6 \
|
||||
--replace libwayland-client.so.0 ${wayland}/lib/libwayland-client.so.0
|
||||
'' +
|
||||
# bring our own system libraries
|
||||
# https://github.com/matplotlib/matplotlib/blob/main/doc/devel/dependencies.rst#c-libraries
|
||||
''
|
||||
echo "[libs]
|
||||
system_freetype=true
|
||||
system_qhull=true" > mplsetup.cfg
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
certifi
|
||||
numpy
|
||||
oldest-supported-numpy # TODO remove after updating to 3.8.0
|
||||
pkg-config
|
||||
pybind11
|
||||
setuptools
|
||||
@@ -184,16 +174,17 @@ buildPythonPackage rec {
|
||||
libs = {
|
||||
system_freetype = true;
|
||||
system_qhull = true;
|
||||
} // lib.optionalAttrs stdenv.isDarwin {
|
||||
# LTO not working in darwin stdenv, see #19312
|
||||
enable_lto = false;
|
||||
enable_lto = !stdenv.isDarwin;
|
||||
};
|
||||
};
|
||||
|
||||
env.MPLSETUPCFG = writeText "mplsetup.cfg" (lib.generators.toINI {} passthru.config);
|
||||
|
||||
# Matplotlib needs to be built against a specific version of freetype in
|
||||
# order for all of the tests to pass.
|
||||
# Encountering a ModuleNotFoundError, as describved and investigated at:
|
||||
# https://github.com/NixOS/nixpkgs/issues/255262 . It could be that some of
|
||||
# which may fail due to a freetype version that doesn't match the freetype
|
||||
# version used by upstream.
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
Reference in New Issue
Block a user