python39Packages.pyregion: unbreak (#117630)
This commit is contained in:
parent
70900069ad
commit
29d3a57806
@ -1,13 +1,13 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchPypi
|
, fetchFromGitHub
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
, pyparsing
|
, pyparsing
|
||||||
, numpy
|
, numpy
|
||||||
, cython
|
, cython
|
||||||
, astropy
|
, astropy
|
||||||
, astropy-helpers
|
, astropy-helpers
|
||||||
, pytest
|
, pytestCheckHook
|
||||||
, pytest-astropy
|
, pytest-astropy
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -15,15 +15,18 @@ buildPythonPackage rec {
|
|||||||
pname = "pyregion";
|
pname = "pyregion";
|
||||||
version = "2.0";
|
version = "2.0";
|
||||||
|
|
||||||
src = fetchPypi {
|
# pypi src contains cython-produced .c files which don't compile
|
||||||
inherit pname version;
|
# with python3.9
|
||||||
sha256 = "a8ac5f764b53ec332f6bc43f6f2193ca13e8b7d5a3fb2e20ced6b2ea42a9d094";
|
src = fetchFromGitHub {
|
||||||
|
owner = "astropy";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "1izar7z606czcyws9s8bjbpb1xhqshpv5009rlpc92hciw7jv4kg";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
pyparsing
|
pyparsing
|
||||||
numpy
|
numpy
|
||||||
cython
|
|
||||||
astropy
|
astropy
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -36,9 +39,9 @@ buildPythonPackage rec {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ astropy-helpers ];
|
nativeBuildInputs = [ astropy-helpers cython ];
|
||||||
|
|
||||||
checkInputs = [ pytest pytest-astropy ];
|
checkInputs = [ pytestCheckHook pytest-astropy ];
|
||||||
|
|
||||||
# Disable automatic update of the astropy-helper module
|
# Disable automatic update of the astropy-helper module
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
@ -46,9 +49,11 @@ buildPythonPackage rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
# Tests must be run in the build directory
|
# Tests must be run in the build directory
|
||||||
checkPhase = ''
|
preCheck = ''
|
||||||
cd build/lib.*
|
pushd build/lib.*
|
||||||
pytest
|
'';
|
||||||
|
postCheck = ''
|
||||||
|
popd
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user