Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pyproj / default.nix
blobbb98e96e02a16518745757eed826ead786bc5282
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , python
5 , proj
6 , pythonOlder
7 , substituteAll
8 , cython
9 , pytestCheckHook
10 , mock
11 , certifi
12 , numpy
13 , shapely
14 , pandas
15 , xarray
18 buildPythonPackage rec {
19   pname = "pyproj";
20   version = "3.6.1";
21   format = "setuptools";
22   disabled = pythonOlder "3.9";
24   src = fetchFromGitHub {
25     owner = "pyproj4";
26     repo = "pyproj";
27     rev = "refs/tags/${version}";
28     hash = "sha256-ynAhu89VpvtQJRkIeVyffQHhd+OvWSiZzaI/7nd6fXA=";
29   };
31   # force pyproj to use ${proj}
32   patches = [
33     (substituteAll {
34       src = ./001.proj.patch;
35       proj = proj;
36       projdev = proj.dev;
37     })
38   ];
40   nativeBuildInputs = [ cython ];
41   buildInputs = [ proj ];
43   propagatedBuildInputs = [
44      certifi
45   ];
47   nativeCheckInputs = [
48     pytestCheckHook
49     mock
50     numpy
51     shapely
52     pandas
53     xarray
54   ];
56   preCheck = ''
57     # import from $out
58     rm -r pyproj
59   '';
61   disabledTestPaths = [
62     "test/test_doctest_wrapper.py"
63     "test/test_datadir.py"
64   ];
66   disabledTests = [
67     # The following tests try to access network and end up with a URLError
68     "test__load_grid_geojson_old_file"
69     "test_get_transform_grid_list"
70     "test_get_transform_grid_list__area_of_use"
71     "test_get_transform_grid_list__bbox__antimeridian"
72     "test_get_transform_grid_list__bbox__out_of_bounds"
73     "test_get_transform_grid_list__contains"
74     "test_get_transform_grid_list__file"
75     "test_get_transform_grid_list__source_id"
76     "test_sync__area_of_use__list"
77     "test_sync__bbox__list"
78     "test_sync__bbox__list__exclude_world_coverage"
79     "test_sync__download_grids"
80     "test_sync__file__list"
81     "test_sync__source_id__list"
82     "test_sync_download"
83     "test_sync_download__directory"
84     "test_sync_download__system_directory"
85     "test_transformer_group__download_grids"
87     # proj-data grid required
88     "test_azimuthal_equidistant"
89   ];
91   pythonImportsCheck = [
92     "pyproj"
93     "pyproj.crs"
94     "pyproj.transformer"
95     "pyproj.geod"
96     "pyproj.proj"
97     "pyproj.database"
98     "pyproj.list"
99     "pyproj.datadir"
100     "pyproj.network"
101     "pyproj.sync"
102     "pyproj.enums"
103     "pyproj.aoi"
104     "pyproj.exceptions"
105   ];
107   meta = with lib; {
108     description = "Python interface to PROJ library";
109     mainProgram = "pyproj";
110     homepage = "https://github.com/pyproj4/pyproj";
111     changelog = "https://github.com/pyproj4/pyproj/blob/${src.rev}/docs/history.rst";
112     license = licenses.mit;
113     maintainers = with maintainers; teams.geospatial.members ++ [ lsix dotlambda ];
114   };