2019-02-13 15:15:23 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-02-25 16:51:15 +00:00
|
|
|
, fetchpatch
|
2019-02-13 15:15:23 +00:00
|
|
|
, numpy
|
|
|
|
, astropy
|
|
|
|
, astropy-healpix
|
|
|
|
, astropy-helpers
|
2020-06-20 23:30:32 +01:00
|
|
|
, extension-helpers
|
2019-02-13 15:15:23 +00:00
|
|
|
, scipy
|
2019-12-03 13:25:17 +00:00
|
|
|
, pytest
|
|
|
|
, pytest-astropy
|
2020-06-20 23:30:32 +01:00
|
|
|
, setuptools_scm
|
2019-12-03 13:25:17 +00:00
|
|
|
, cython
|
2019-02-13 15:15:23 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "reproject";
|
2020-06-20 23:30:32 +01:00
|
|
|
version = "0.7.1";
|
2019-02-13 15:15:23 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-06-20 23:30:32 +01:00
|
|
|
sha256 = "1jsc3ad518vyys5987fr1achq8qvnz8rm80zp5an9qxlwr4zmh4m";
|
2019-02-13 15:15:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ numpy astropy astropy-healpix astropy-helpers scipy ];
|
|
|
|
|
2020-06-20 23:30:32 +01:00
|
|
|
nativeBuildInputs = [ astropy-helpers cython extension-helpers setuptools_scm ];
|
2020-02-25 16:51:15 +00:00
|
|
|
|
2019-02-13 15:15:23 +00:00
|
|
|
# Disable automatic update of the astropy-helper module
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
|
|
|
|
'';
|
|
|
|
|
2019-12-03 13:25:17 +00:00
|
|
|
checkInputs = [ pytest pytest-astropy ];
|
|
|
|
|
|
|
|
# Tests must be run in the build directory
|
|
|
|
checkPhase = ''
|
|
|
|
cd build/lib*
|
|
|
|
pytest
|
|
|
|
'';
|
|
|
|
|
2019-02-13 15:15:23 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Reproject astronomical images";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://reproject.readthedocs.io";
|
2019-02-13 15:15:23 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.smaret ];
|
|
|
|
};
|
|
|
|
}
|