2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, fetchpatch
|
|
|
|
, numpy
|
|
|
|
, astropy
|
|
|
|
, astropy-healpix
|
|
|
|
, astropy-helpers
|
2021-01-05 17:05:55 +00:00
|
|
|
, astropy-extension-helpers
|
2020-04-24 23:36:52 +00:00
|
|
|
, scipy
|
|
|
|
, pytest
|
|
|
|
, pytest-astropy
|
2021-06-04 09:07:49 +00:00
|
|
|
, setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
, cython
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "reproject";
|
2020-06-15 15:56:04 +00:00
|
|
|
version = "0.7.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-06-15 15:56:04 +00:00
|
|
|
sha256 = "1jsc3ad518vyys5987fr1achq8qvnz8rm80zp5an9qxlwr4zmh4m";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
patches = [ (fetchpatch {
|
|
|
|
# Can be removed in next release after 0.7.1
|
|
|
|
# See https://github.com/astropy/reproject/issues/246
|
|
|
|
url = "https://github.com/astropy/reproject/pull/243.patch";
|
|
|
|
sha256 = "0dq3ii39hsrks0b9v306dlqf07dx0hqad8rwajmzw6rfda9m3c2a";
|
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
propagatedBuildInputs = [ numpy astropy astropy-healpix astropy-helpers scipy ];
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ astropy-helpers cython astropy-extension-helpers setuptools-scm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
checkInputs = [ pytest pytest-astropy ];
|
|
|
|
|
|
|
|
# Tests must be run in the build directory
|
|
|
|
checkPhase = ''
|
|
|
|
cd build/lib*
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Reproject astronomical images";
|
|
|
|
homepage = "https://reproject.readthedocs.io";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.smaret ];
|
|
|
|
};
|
|
|
|
}
|