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