Merge pull request #241513 from natsukium/matplotx/darwin-fix

python310Packages.{matplotx,perfplot,accupy}: fix darwin build
This commit is contained in:
Weijia Wang 2023-07-06 15:11:17 +03:00 committed by GitHub
commit d89ca0ec1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View file

@ -1,4 +1,5 @@
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
@ -56,6 +57,10 @@ buildPythonPackage rec {
export HOME=$(mktemp -d)
'';
# This variable is needed to suppress the "Trace/BPT trap: 5" error in Darwin's checkPhase.
# Not sure of the details, but we can avoid it by changing the matplotlib backend during testing.
env.MPLBACKEND = lib.optionalString stdenv.isDarwin "Agg";
# performance tests aren't useful to us and disabling them allows us to
# decouple ourselves from an unnecessary build dep
preCheck = ''

View file

@ -1,4 +1,5 @@
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
@ -41,11 +42,13 @@ buildPythonPackage rec {
];
};
checkInputs = passthru.optional-dependencies.all;
# This variable is needed to suppress the "Trace/BPT trap: 5" error in Darwin's checkPhase.
# Not sure of the details, but we can avoid it by changing the matplotlib backend during testing.
env.MPLBACKEND = lib.optionalString stdenv.isDarwin "Agg";
nativeCheckInputs = [
pytestCheckHook
];
] ++ passthru.optional-dependencies.all;
disabledTestPaths = [
"tests/test_spy.py" # Requires meshzoo (non-free) and pytest-codeblocks (not packaged)

View file

@ -1,4 +1,5 @@
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, flit-core
@ -35,6 +36,10 @@ buildPythonPackage rec {
rich
];
# This variable is needed to suppress the "Trace/BPT trap: 5" error in Darwin's checkPhase.
# Not sure of the details, but we can avoid it by changing the matplotlib backend during testing.
env.MPLBACKEND = lib.optionalString stdenv.isDarwin "Agg";
nativeCheckInputs = [
pytestCheckHook
];