From 7a468478bce26e7c65abbee16a4bb3dbecd33c1d Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Mon, 28 Dec 2020 14:50:25 -0500 Subject: [PATCH] python3Packages.aplpy: unbreak --- .../python-modules/aplpy/default.nix | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/aplpy/default.nix b/pkgs/development/python-modules/aplpy/default.nix index a6eedb3b7a4b..e253c610c214 100644 --- a/pkgs/development/python-modules/aplpy/default.nix +++ b/pkgs/development/python-modules/aplpy/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, fetchpatch , numpy , astropy , astropy-helpers @@ -18,6 +19,7 @@ buildPythonPackage rec { pname = "aplpy"; version = "2.0.3"; + format = "pyproject"; src = fetchPypi { pname = "APLpy"; @@ -25,6 +27,15 @@ buildPythonPackage rec { sha256 = "239f3d83635ca4251536aeb577df7c60df77fc4d658097b92094719739aec3f3"; }; + patches = [ (fetchpatch { + # Can be removed in next release after 2.0.3 + url = "https://github.com/aplpy/aplpy/pull/448.patch"; + sha256 = "1pnzh7ykjc8hwahzbzyryrzv5a8fddgd1bmzbhagkrn6lmvhhpvq"; + excludes = [ "tox.ini" "azure-pipelines.yml" ".circleci/config.yml" "MANIFEST.in" ".gitignore" + "setup.cfg" "appveyor.yml" "readthedocs.yml" "CHANGES.rst" ".gitmodules" ".travis.yml" "astropy_helpers" ]; + }) + ]; + propagatedBuildInputs = [ numpy astropy @@ -38,18 +49,10 @@ buildPythonPackage rec { ]; nativeBuildInputs = [ astropy-helpers ]; - checkInputs = [ pytest pytest-astropy ]; - # Disable automatic update of the astropy-helper module - postPatch = '' - substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False" - ''; - - # Tests must be run in the build directory checkPhase = '' - cd build/lib - pytest + OPENMP_EXPECTED=0 pytest aplpy ''; meta = with lib; {