about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/aplpy/default.nix
blob: e253c610c2144cae57cbcebaa134bb7f1465da08 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, numpy
, astropy
, astropy-helpers
, matplotlib
, reproject
, pyavm
, pyregion
, pillow
, scikitimage
, shapely
, pytest
, pytest-astropy
}:

buildPythonPackage rec {
  pname = "aplpy";
  version = "2.0.3";
  format = "pyproject";

  src = fetchPypi {
    pname = "APLpy";
    inherit version;
    sha256 = "239f3d83635ca4251536aeb577df7c60df77fc4d658097b92094719739aec3f3";
  };

  patches = [ (fetchpatch {
      # Can be removed in next release after 2.0.3
      url = "https://github.com/aplpy/aplpy/pull/448.patch";
      sha256 = "1pnzh7ykjc8hwahzbzyryrzv5a8fddgd1bmzbhagkrn6lmvhhpvq";
      excludes = [ "tox.ini" "azure-pipelines.yml" ".circleci/config.yml" "MANIFEST.in" ".gitignore"
       "setup.cfg" "appveyor.yml" "readthedocs.yml" "CHANGES.rst" ".gitmodules" ".travis.yml" "astropy_helpers" ];
    })
  ];

  propagatedBuildInputs = [
    numpy
    astropy
    matplotlib
    reproject
    pyavm
    pyregion
    pillow
    scikitimage
    shapely
  ];

  nativeBuildInputs = [ astropy-helpers ];
  checkInputs = [ pytest pytest-astropy ];

  checkPhase = ''
    OPENMP_EXPECTED=0 pytest aplpy
  '';

  meta = with lib; {
    description = "The Astronomical Plotting Library in Python";
    homepage = "http://aplpy.github.io";
    license = licenses.mit;
    maintainers = [ maintainers.smaret ];
  };
}