nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 numpy,
7 astropy,
8 extension-helpers,
9 setuptools,
10 setuptools-scm,
11 pytestCheckHook,
12 pytest-doctestplus,
13 hypothesis,
14}:
15
16buildPythonPackage (finalAttrs: {
17 pname = "astropy-healpix";
18 version = "1.1.3";
19 pyproject = true;
20
21 src = fetchPypi {
22 inherit (finalAttrs) version;
23 pname = "astropy_healpix";
24 hash = "sha256-9SDYOr6CFdPo4aN7K9kRce42pvVfEQ1aLbhj112Bs7c=";
25 };
26
27 build-system = [
28 extension-helpers
29 numpy
30 setuptools
31 setuptools-scm
32 ];
33
34 dependencies = [
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 = {
53 description = "BSD-licensed HEALPix for Astropy";
54 homepage = "https://github.com/astropy/astropy-healpix";
55 changelog = "https://github.com/astropy/astropy-healpix/blob/v${finalAttrs.version}/CHANGES.rst";
56 license = lib.licenses.bsd3;
57 maintainers = [ lib.maintainers.smaret ];
58 };
59})