1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 numpy,
7 astropy,
8 astropy-extension-helpers,
9 setuptools,
10 setuptools-scm,
11 pytestCheckHook,
12 pytest-doctestplus,
13 hypothesis,
14}:
15
16buildPythonPackage rec {
17 pname = "astropy-healpix";
18 version = "1.1.2";
19 pyproject = true;
20
21 src = fetchPypi {
22 inherit version;
23 pname = lib.replaceStrings [ "-" ] [ "_" ] pname;
24 hash = "sha256-A2cd8So27Ds1fCRNUVS2eGNi/12AdwZ1x7JIFRAQZuQ=";
25 };
26
27 nativeBuildInputs = [
28 astropy-extension-helpers
29 numpy
30 setuptools
31 setuptools-scm
32 ];
33
34 propagatedBuildInputs = [
35 numpy
36 astropy
37 ];
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 pytest-doctestplus
42 hypothesis
43 ];
44
45 disabledTests = lib.optional (!stdenv.hostPlatform.isDarwin) "test_interpolate_bilinear_skycoord";
46
47 # tests must be run in the build directory
48 preCheck = ''
49 cd build/lib*
50 '';
51
52 meta = with lib; {
53 description = "BSD-licensed HEALPix for Astropy";
54 homepage = "https://github.com/astropy/astropy-healpix";
55 license = licenses.bsd3;
56 maintainers = [ maintainers.smaret ];
57 };
58}