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 ]
55 ++ dask.optional-dependencies.array;
56
57 nativeCheckInputs = [
58 pytest-astropy
59 pytestCheckHook
60 ];
61
62 pytestFlags = [
63 # Avoid failure due to user warning: Distutils was imported before Setuptools
64 "-pno:warnings"
65 # prevent "'filterwarnings' not found in `markers` configuration option" error
66 "-omarkers=filterwarnings"
67 ];
68
69 enabledTestPaths = [
70 "build/lib*"
71 ];
72
73 disabledTestPaths = [
74 # Uses network
75 "build/lib*/reproject/interpolation/"
76 ];
77
78 pythonImportsCheck = [ "reproject" ];
79
80 meta = with lib; {
81 description = "Reproject astronomical images";
82 downloadPage = "https://github.com/astropy/reproject";
83 homepage = "https://reproject.readthedocs.io";
84 changelog = "https://github.com/astropy/reproject/releases/tag/v${version}";
85 license = licenses.bsd3;
86 maintainers = with maintainers; [ smaret ];
87 };
88}