2021-04-13 19:44:15 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python
|
|
|
|
, proj
|
|
|
|
, pythonOlder
|
|
|
|
, substituteAll
|
2020-04-24 23:36:52 +00:00
|
|
|
, cython
|
2020-12-07 07:45:13 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, mock
|
2021-04-13 19:44:15 +00:00
|
|
|
, certifi
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
|
|
|
, shapely
|
2021-04-13 19:44:15 +00:00
|
|
|
, pandas
|
|
|
|
, xarray
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyproj";
|
2021-09-28 08:13:01 +00:00
|
|
|
version = "3.2.1";
|
2021-04-13 19:44:15 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pyproj4";
|
|
|
|
repo = "pyproj";
|
2021-04-13 19:44:15 +00:00
|
|
|
rev = version;
|
2021-09-28 08:13:01 +00:00
|
|
|
sha256 = "sha256-r343TvXpSr+EMAbvzSUpsfipwP8TFmitOfT0gjgoO00=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
# force pyproj to use ${proj}
|
2020-04-24 23:36:52 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./001.proj.patch;
|
2021-04-13 19:44:15 +00:00
|
|
|
proj = proj;
|
|
|
|
projdev = proj.dev;
|
2020-04-24 23:36:52 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
nativeBuildInputs = [ cython ];
|
|
|
|
buildInputs = [ proj ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-04-13 19:44:15 +00:00
|
|
|
certifi
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
mock
|
|
|
|
numpy
|
|
|
|
shapely
|
|
|
|
pandas
|
|
|
|
xarray
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
preCheck = ''
|
|
|
|
# We need to build extensions locally to run tests
|
|
|
|
${python.interpreter} setup.py build_ext --inplace
|
|
|
|
cd test
|
|
|
|
'';
|
2020-12-07 07:45:13 +00:00
|
|
|
|
2021-04-13 19:44:15 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"test_doctest_wrapper.py"
|
|
|
|
"test_datadir.py"
|
2020-12-07 07:45:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2021-04-13 19:44:15 +00:00
|
|
|
# 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_get_transform_grid_list__area_of_use"
|
|
|
|
"test_get_transform_grid_list__bbox__antimeridian"
|
|
|
|
"test_get_transform_grid_list__bbox__out_of_bounds"
|
|
|
|
"test_get_transform_grid_list__contains"
|
|
|
|
"test_get_transform_grid_list__file"
|
|
|
|
"test_get_transform_grid_list__source_id"
|
|
|
|
"test_sync__area_of_use__list"
|
|
|
|
"test_sync__bbox__list"
|
|
|
|
"test_sync__bbox__list__exclude_world_coverage"
|
|
|
|
"test_sync__download_grids"
|
|
|
|
"test_sync__file__list"
|
|
|
|
"test_sync__source_id__list"
|
|
|
|
"test_sync_download"
|
|
|
|
"test_sync_download__directory"
|
|
|
|
"test_sync_download__system_directory"
|
|
|
|
"test_transformer_group__download_grids"
|
2020-12-07 07:45:13 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Python interface to PROJ.4 library";
|
2021-04-13 19:44:15 +00:00
|
|
|
homepage = "https://github.com/pyproj4/pyproj";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with lib.licenses; [ isc ];
|
2021-04-13 19:44:15 +00:00
|
|
|
maintainers = with lib.maintainers; [ lsix ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|