python3Packages.aplpy: unbreak

This commit is contained in:
Robert T. McGibbon 2020-12-28 14:50:25 -05:00
parent f5dc54e7b6
commit 7a468478bc

View File

@ -1,6 +1,7 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, fetchpatch
, numpy , numpy
, astropy , astropy
, astropy-helpers , astropy-helpers
@ -18,6 +19,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "aplpy"; pname = "aplpy";
version = "2.0.3"; version = "2.0.3";
format = "pyproject";
src = fetchPypi { src = fetchPypi {
pname = "APLpy"; pname = "APLpy";
@ -25,6 +27,15 @@ buildPythonPackage rec {
sha256 = "239f3d83635ca4251536aeb577df7c60df77fc4d658097b92094719739aec3f3"; 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 = [ propagatedBuildInputs = [
numpy numpy
astropy astropy
@ -38,18 +49,10 @@ buildPythonPackage rec {
]; ];
nativeBuildInputs = [ astropy-helpers ]; nativeBuildInputs = [ astropy-helpers ];
checkInputs = [ pytest pytest-astropy ]; 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 = '' checkPhase = ''
cd build/lib OPENMP_EXPECTED=0 pytest aplpy
pytest
''; '';
meta = with lib; { meta = with lib; {