evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / cartopy / default.nix
blob79059c7d53f5f93e74b129e03e55fe93f4f33d4a
2   lib,
3   buildPythonPackage,
4   cython,
5   fetchpatch,
6   fetchPypi,
7   fontconfig,
8   gdal,
9   geos,
10   matplotlib,
11   numpy,
12   owslib,
13   pillow,
14   proj,
15   pyproj,
16   pyshp,
17   pytest-mpl,
18   pytestCheckHook,
19   pythonOlder,
20   scipy,
21   setuptools-scm,
22   shapely,
25 buildPythonPackage rec {
26   pname = "cartopy";
27   version = "0.24.1";
28   pyproject = true;
30   disabled = pythonOlder "3.10";
32   src = fetchPypi {
33     inherit pname version;
34     hash = "sha256-AckQ1WNMaafv3sRuChfUc9Iyh2fwAdTcC1xLSOWFyL0=";
35   };
37   postPatch = ''
38     substituteInPlace pyproject.toml \
39       --replace-fail "numpy>=2.0.0rc1" "numpy"
40   '';
42   build-system = [ setuptools-scm ];
44   nativeBuildInputs = [
45     cython
46     geos # for geos-config
47     proj
48   ];
50   buildInputs = [
51     geos
52     proj
53   ];
55   dependencies = [
56     matplotlib
57     numpy
58     pyproj
59     pyshp
60     shapely
61   ];
63   optional-dependencies = {
64     ows = [
65       owslib
66       pillow
67     ];
68     plotting = [
69       gdal
70       pillow
71       scipy
72     ];
73   };
75   nativeCheckInputs = [
76     pytest-mpl
77     pytestCheckHook
78   ] ++ lib.flatten (lib.attrValues optional-dependencies);
80   preCheck = ''
81     export FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf
82     export HOME=$TMPDIR
83   '';
85   pytestFlagsArray = [
86     "--pyargs"
87     "cartopy"
88     "-m"
89     "'not network and not natural_earth'"
90   ];
92   disabledTests = [
93     "test_gridliner_constrained_adjust_datalim"
94     "test_gridliner_labels_bbox_style"
95   ];
97   meta = with lib; {
98     description = "Process geospatial data to create maps and perform analyses";
99     homepage = "https://scitools.org.uk/cartopy/docs/latest/";
100     changelog = "https://github.com/SciTools/cartopy/releases/tag/v${version}";
101     license = licenses.lgpl3Plus;
102     maintainers = with maintainers; [ ];
103     mainProgram = "feature_download";
104   };