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
16}:
17
18buildPythonPackage rec {
19 pname = "pyproj";
20 version = "3.2.1";
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "pyproj4";
25 repo = "pyproj";
26 rev = version;
27 sha256 = "sha256-r343TvXpSr+EMAbvzSUpsfipwP8TFmitOfT0gjgoO00=";
28 };
29
30 # force pyproj to use ${proj}
31 patches = [
32 (substituteAll {
33 src = ./001.proj.patch;
34 proj = proj;
35 projdev = proj.dev;
36 })
37 ];
38
39 nativeBuildInputs = [ cython ];
40 buildInputs = [ proj ];
41
42 propagatedBuildInputs = [
43 certifi
44 ];
45
46 checkInputs = [
47 pytestCheckHook
48 mock
49 numpy
50 shapely
51 pandas
52 xarray
53 ];
54
55 preCheck = ''
56 # We need to build extensions locally to run tests
57 ${python.interpreter} setup.py build_ext --inplace
58 cd test
59 '';
60
61 disabledTestPaths = [
62 "test_doctest_wrapper.py"
63 "test_datadir.py"
64 ];
65
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"
86 ];
87
88 meta = {
89 description = "Python interface to PROJ.4 library";
90 homepage = "https://github.com/pyproj4/pyproj";
91 license = with lib.licenses; [ isc ];
92 maintainers = with lib.maintainers; [ lsix ];
93 };
94}