2019-02-13 16:15:23 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-02-25 17:51:15 +01:00
|
|
|
, fetchpatch
|
2019-02-13 16:15:23 +01:00
|
|
|
, numpy
|
|
|
|
, astropy
|
|
|
|
, astropy-healpix
|
|
|
|
, astropy-helpers
|
|
|
|
, scipy
|
2019-12-03 14:25:17 +01:00
|
|
|
, pytest
|
|
|
|
, pytest-astropy
|
|
|
|
, cython
|
2019-02-13 16:15:23 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "reproject";
|
2019-12-03 14:25:17 +01:00
|
|
|
version = "0.6";
|
2019-02-13 16:15:23 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-12-03 14:25:17 +01:00
|
|
|
sha256 = "484fde86d70d972d703038f138d7c2966ddf51171a6e79bd84e82ea270e27af3";
|
2019-02-13 16:15:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ numpy astropy astropy-healpix astropy-helpers scipy ];
|
|
|
|
|
2019-12-03 14:25:17 +01:00
|
|
|
nativeBuildInputs = [ astropy-helpers cython ];
|
|
|
|
|
2020-02-25 17:51:15 +01:00
|
|
|
# Fix tests
|
|
|
|
patches = [ (fetchpatch {
|
|
|
|
url = "https://github.com/astropy/reproject/pull/218/commits/4661e075137424813ed77f1ebcbc251fee1b8467.patch";
|
|
|
|
sha256 = "13g3h824pqn2lgypzg1b87vkd44y7m302lhw3kh4rfww1dkzhm9v";
|
|
|
|
}) ];
|
|
|
|
|
2019-02-13 16:15:23 +01:00
|
|
|
# Disable automatic update of the astropy-helper module
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
|
|
|
|
'';
|
|
|
|
|
2019-12-03 14:25:17 +01:00
|
|
|
checkInputs = [ pytest pytest-astropy ];
|
|
|
|
|
|
|
|
# Tests must be run in the build directory
|
|
|
|
checkPhase = ''
|
|
|
|
cd build/lib*
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
2019-02-13 16:15:23 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Reproject astronomical images";
|
|
|
|
homepage = https://reproject.readthedocs.io;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.smaret ];
|
|
|
|
};
|
|
|
|
}
|