From 7af89007ad2913453646de12597eaf415eb565f0 Mon Sep 17 00:00:00 2001 From: Drew Risinger Date: Tue, 4 May 2021 13:06:19 -0400 Subject: [PATCH] python3Packages.qiskit-ignis: fix aarch64 build Also remove unused patch & unneeded docs delete (they're not in $out). --- .../python-modules/qiskit-ignis/default.nix | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/qiskit-ignis/default.nix b/pkgs/development/python-modules/qiskit-ignis/default.nix index 996259f683b..f7ebbee39f8 100644 --- a/pkgs/development/python-modules/qiskit-ignis/default.nix +++ b/pkgs/development/python-modules/qiskit-ignis/default.nix @@ -1,8 +1,8 @@ { lib +, stdenv , pythonOlder , buildPythonPackage , fetchFromGitHub -, python , numpy , qiskit-terra , scikit-learn @@ -35,12 +35,6 @@ buildPythonPackage rec { hash = "sha256-L5fwCMsN03ojiDvKIyqsGfUnwej1P7bpyHlL6mu7nh0="; }; - # hacky, fix https://github.com/Qiskit/qiskit-ignis/issues/532. - # TODO: remove on qiskit-ignis v0.5.2 - postPatch = '' - substituteInPlace qiskit/ignis/mitigation/expval/base_meas_mitigator.py --replace "plt.axes" "'plt.axes'" - ''; - propagatedBuildInputs = [ numpy qiskit-terra @@ -49,12 +43,13 @@ buildPythonPackage rec { ] ++ lib.optionals (withCvx) [ cvxpy ] ++ lib.optionals (withVisualization) [ matplotlib ] ++ lib.optionals (withJit) [ numba ]; - postInstall = "rm -rf $out/${python.sitePackages}/docs"; # this dir can create conflicts # Tests pythonImportsCheck = [ "qiskit.ignis" ]; dontUseSetuptoolsCheck = true; - preCheck = "export HOME=$TMPDIR"; + preCheck = '' + export HOME=$TMPDIR + ''; checkInputs = [ pytestCheckHook ddt @@ -63,7 +58,8 @@ buildPythonPackage rec { ]; disabledTests = [ "test_tensored_meas_cal_on_circuit" # Flaky test, occasionally returns result outside bounds - "test_qv_fitter" # execution hangs, ran for several minutes + ] ++ lib.optionals stdenv.isAarch64 [ + "test_fitters" # Fails check that arrays are close. Might be due to aarch64 math issues. ]; meta = with lib; {