1{
2 lib,
3 astropy,
4 astropy-extension-helpers,
5 astropy-healpix,
6 buildPythonPackage,
7 cloudpickle,
8 cython,
9 dask,
10 fetchPypi,
11 fsspec,
12 numpy,
13 pytest-astropy,
14 pytestCheckHook,
15 pythonOlder,
16 scipy,
17 setuptools-scm,
18 zarr,
19}:
20
21buildPythonPackage rec {
22 pname = "reproject";
23 version = "0.14.1";
24 pyproject = true;
25
26 disabled = pythonOlder "3.10";
27
28 src = fetchPypi {
29 inherit pname version;
30 hash = "sha256-U8jqJ5uLVX8zoeQwr14FPNdHACRA4HK65q2TAtRr5Xk=";
31 };
32
33 postPatch = ''
34 substituteInPlace pyproject.toml \
35 --replace "cython==" "cython>="
36 '';
37
38 nativeBuildInputs = [
39 astropy-extension-helpers
40 cython
41 numpy
42 setuptools-scm
43 ];
44
45 propagatedBuildInputs = [
46 astropy
47 astropy-healpix
48 cloudpickle
49 dask
50 fsspec
51 numpy
52 scipy
53 zarr
54 ] ++ dask.optional-dependencies.array;
55
56 nativeCheckInputs = [
57 pytest-astropy
58 pytestCheckHook
59 ];
60
61 pytestFlagsArray = [
62 "build/lib*"
63 # Avoid failure due to user warning: Distutils was imported before Setuptools
64 "-p no:warnings"
65 # Uses network
66 "--ignore build/lib*/reproject/interpolation/"
67 # prevent "'filterwarnings' not found in `markers` configuration option" error
68 "-o 'markers=filterwarnings'"
69 ];
70
71 pythonImportsCheck = [ "reproject" ];
72
73 meta = with lib; {
74 description = "Reproject astronomical images";
75 downloadPage = "https://github.com/astropy/reproject";
76 homepage = "https://reproject.readthedocs.io";
77 changelog = "https://github.com/astropy/reproject/releases/tag/v${version}";
78 license = licenses.bsd3;
79 maintainers = with maintainers; [ smaret ];
80 };
81}