diff options
author | Robert T. McGibbon <rmcgibbo@gmail.com> | 2021-03-26 14:15:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-26 19:15:41 +0100 |
commit | 29d3a57806b9aff4dcff258fff9a156fd880b30c (patch) | |
tree | 693ea81adf20e2897349055a2a45ed2235c21fce | |
parent | 70900069ada755a7d8d3b3fb0f90f689bb7f5c4a (diff) | |
download | nixpkgs-29d3a57806b9aff4dcff258fff9a156fd880b30c.tar nixpkgs-29d3a57806b9aff4dcff258fff9a156fd880b30c.tar.gz nixpkgs-29d3a57806b9aff4dcff258fff9a156fd880b30c.tar.bz2 nixpkgs-29d3a57806b9aff4dcff258fff9a156fd880b30c.tar.lz nixpkgs-29d3a57806b9aff4dcff258fff9a156fd880b30c.tar.xz nixpkgs-29d3a57806b9aff4dcff258fff9a156fd880b30c.tar.zst nixpkgs-29d3a57806b9aff4dcff258fff9a156fd880b30c.zip |
python39Packages.pyregion: unbreak (#117630)
-rw-r--r-- | pkgs/development/python-modules/pyregion/default.nix | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/pyregion/default.nix b/pkgs/development/python-modules/pyregion/default.nix index 86a5ef6bfe0..6d33e18e4f9 100644 --- a/pkgs/development/python-modules/pyregion/default.nix +++ b/pkgs/development/python-modules/pyregion/default.nix @@ -1,13 +1,13 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , fetchpatch , pyparsing , numpy , cython , astropy , astropy-helpers -, pytest +, pytestCheckHook , pytest-astropy }: @@ -15,15 +15,18 @@ buildPythonPackage rec { pname = "pyregion"; version = "2.0"; - src = fetchPypi { - inherit pname version; - sha256 = "a8ac5f764b53ec332f6bc43f6f2193ca13e8b7d5a3fb2e20ced6b2ea42a9d094"; + # pypi src contains cython-produced .c files which don't compile + # with python3.9 + src = fetchFromGitHub { + owner = "astropy"; + repo = pname; + rev = version; + sha256 = "1izar7z606czcyws9s8bjbpb1xhqshpv5009rlpc92hciw7jv4kg"; }; propagatedBuildInputs = [ pyparsing numpy - cython 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 postPatch = '' @@ -46,9 +49,11 @@ buildPythonPackage rec { ''; # Tests must be run in the build directory - checkPhase = '' - cd build/lib.* - pytest + preCheck = '' + pushd build/lib.* + ''; + postCheck = '' + popd ''; meta = with lib; { |