Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

python310Packages.matplotlib: multiple cleanup commits #279317

Merged
merged 4 commits into from
Jan 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions pkgs/development/python-modules/matplotlib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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; {
Expand Down