evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / pygmt / default.nix
blob7bba01e4e44e028310c9ce6e3f15c9c8f911928b
2   lib,
3   pythonOlder,
4   buildPythonPackage,
5   fetchFromGitHub,
6   setuptools-scm,
7   gmt,
8   numpy,
9   netcdf4,
10   pandas,
11   packaging,
12   xarray,
13   pytest-mpl,
14   ipython,
15   ghostscript,
16   pytestCheckHook,
19 buildPythonPackage rec {
20   pname = "pygmt";
21   version = "0.13.0";
22   pyproject = true;
24   disabled = pythonOlder "3.9";
26   src = fetchFromGitHub {
27     owner = "GenericMappingTools";
28     repo = "pygmt";
29     rev = "refs/tags/v${version}";
30     hash = "sha256-DO9KUlmt5EV+ioOSQ/BOcx4pP409f94dzmFwqK2MwMY=";
31   };
33   postPatch = ''
34     substituteInPlace pygmt/clib/loading.py \
35       --replace-fail "env.get(\"GMT_LIBRARY_PATH\")" "env.get(\"GMT_LIBRARY_PATH\", \"${gmt}/lib\")"
36   '';
38   nativeBuildInputs = [ setuptools-scm ];
40   propagatedBuildInputs = [
41     numpy
42     netcdf4
43     pandas
44     packaging
45     xarray
46   ];
48   nativeCheckInputs = [
49     pytestCheckHook
50     pytest-mpl
51     ghostscript
52     ipython
53   ];
55   # The *entire* test suite requires network access
56   doCheck = false;
58   postBuild = ''
59     export HOME=$TMP
60   '';
62   pythonImportsCheck = [ "pygmt" ];
64   meta = with lib; {
65     description = "Python interface for the Generic Mapping Tools";
66     homepage = "https://github.com/GenericMappingTools/pygmt";
67     license = licenses.bsd3;
68     changelog = "https://github.com/GenericMappingTools/pygmt/releases/tag/v${version}";
69     maintainers = with maintainers; teams.geospatial.members;
70   };