nixpkgs/pkgs/development/python-modules/reproject/default.nix

51 lines
1.2 KiB
Nix
Raw Normal View History

2019-02-13 15:15:23 +00:00
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
2019-02-13 15:15:23 +00:00
, numpy
, astropy
, astropy-healpix
, astropy-helpers
2020-12-28 19:27:06 +00:00
, astropy-extension-helpers
2019-02-13 15:15:23 +00:00
, scipy
2019-12-03 13:25:17 +00:00
, pytest
, pytest-astropy
, setuptools_scm
2019-12-03 13:25:17 +00:00
, cython
2019-02-13 15:15:23 +00:00
}:
buildPythonPackage rec {
pname = "reproject";
version = "0.7.1";
2019-02-13 15:15:23 +00:00
src = fetchPypi {
inherit pname version;
sha256 = "1jsc3ad518vyys5987fr1achq8qvnz8rm80zp5an9qxlwr4zmh4m";
2019-02-13 15:15:23 +00:00
};
2020-12-28 19:27:06 +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";
})
];
2019-02-13 15:15:23 +00:00
2020-12-28 19:50:43 +00:00
propagatedBuildInputs = [ numpy astropy astropy-healpix astropy-helpers scipy ];
nativeBuildInputs = [ astropy-helpers cython astropy-extension-helpers setuptools_scm ];
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";
homepage = "https://reproject.readthedocs.io";
2019-02-13 15:15:23 +00:00
license = licenses.bsd3;
maintainers = [ maintainers.smaret ];
};
}