1{ lib
2, buildPythonPackage
3, fetchPypi
4, fetchpatch
5, numpy
6, astropy
7, astropy-healpix
8, astropy-helpers
9, astropy-extension-helpers
10, scipy
11, pytest
12, pytest-astropy
13, setuptools-scm
14, cython
15}:
16
17buildPythonPackage rec {
18 pname = "reproject";
19 version = "0.7.1";
20
21 src = fetchPypi {
22 inherit pname version;
23 sha256 = "1jsc3ad518vyys5987fr1achq8qvnz8rm80zp5an9qxlwr4zmh4m";
24 };
25
26 patches = [ (fetchpatch {
27 # Can be removed in next release after 0.7.1
28 # See https://github.com/astropy/reproject/issues/246
29 url = "https://github.com/astropy/reproject/pull/243.patch";
30 sha256 = "0dq3ii39hsrks0b9v306dlqf07dx0hqad8rwajmzw6rfda9m3c2a";
31 })
32 ];
33
34 propagatedBuildInputs = [ numpy astropy astropy-healpix astropy-helpers scipy ];
35 nativeBuildInputs = [ astropy-helpers cython astropy-extension-helpers setuptools-scm ];
36 checkInputs = [ pytest pytest-astropy ];
37
38 # Tests must be run in the build directory
39 checkPhase = ''
40 cd build/lib*
41 pytest
42 '';
43
44 meta = with lib; {
45 description = "Reproject astronomical images";
46 homepage = "https://reproject.readthedocs.io";
47 license = licenses.bsd3;
48 maintainers = [ maintainers.smaret ];
49 };
50}