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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
pythonOlder,
replaceVars,
certifi,
cython,
numpy,
pandas,
proj,
setuptools,
shapely,
xarray,
}:
buildPythonPackage rec {
pname = "pyproj";
version = "3.7.2";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "pyproj4";
repo = "pyproj";
tag = version;
hash = "sha256-WV344gxcmq08sIUVevn6uD50FSy4JvLt4aret5ZakYQ=";
};
# force pyproj to use ${proj}
patches = [
(replaceVars ./001.proj.patch {
proj = proj;
projdev = proj.dev;
})
];
build-system = [
cython
setuptools
];
buildInputs = [ proj ];
dependencies = [ certifi ];
nativeCheckInputs = [
numpy
pandas
pytestCheckHook
shapely
xarray
];
preCheck = ''
# import from $out
rm -r pyproj
'';
disabledTestPaths = [
"test/test_datadir.py"
];
disabledTests = [
# The following tests try to access network and end up with a URLError
"test__load_grid_geojson_old_file"
"test_get_transform_grid_list"
"test_sync__area_of_use__list"
"test_sync__bbox__list"
"test_sync__download_grids"
"test_sync__file__list"
"test_sync__source_id__list"
"test_sync_download"
"test_transformer_group__download_grids"
# https://github.com/pyproj4/pyproj/issues/1553
"test_datum_horizontal"
"test_sub_crs"
];
pythonImportsCheck = [
"pyproj"
"pyproj.crs"
"pyproj.transformer"
"pyproj.geod"
"pyproj.proj"
"pyproj.database"
"pyproj.list"
"pyproj.datadir"
"pyproj.network"
"pyproj.sync"
"pyproj.enums"
"pyproj.aoi"
"pyproj.exceptions"
];
meta = {
description = "Python interface to PROJ library";
mainProgram = "pyproj";
homepage = "https://github.com/pyproj4/pyproj";
changelog = "https://github.com/pyproj4/pyproj/blob/${src.rev}/docs/history.rst";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
dotlambda
];
teams = [ lib.teams.geospatial ];
};
}
|