nixpkgs/pkgs/development/python-modules/pyproj/default.nix

95 lines
2.0 KiB
Nix
Raw Normal View History

{ lib
, buildPythonPackage
, fetchFromGitHub
, python
, proj
, pythonOlder
, substituteAll
, cython
2020-12-01 03:02:52 +00:00
, pytestCheckHook
, mock
, certifi
, numpy
2020-03-24 21:12:58 +00:00
, shapely
, pandas
, xarray
2017-05-04 17:56:25 +01:00
}:
buildPythonPackage rec {
2017-05-04 17:56:25 +01:00
pname = "pyproj";
2021-05-24 22:35:27 +01:00
version = "3.1.0";
disabled = pythonOlder "3.7";
2017-05-04 17:56:25 +01:00
2019-08-01 19:27:35 +01:00
src = fetchFromGitHub {
owner = "pyproj4";
repo = "pyproj";
rev = version;
2021-05-24 22:35:27 +01:00
sha256 = "sha256-UN8cJk5Lgd+d2tKmFuF6QvKr36w1435RKovzGfMXi1E=";
2017-05-04 17:56:25 +01:00
};
# force pyproj to use ${proj}
patches = [
(substituteAll {
src = ./001.proj.patch;
proj = proj;
projdev = proj.dev;
})
];
nativeBuildInputs = [ cython ];
buildInputs = [ proj ];
2017-05-04 17:56:25 +01:00
propagatedBuildInputs = [
certifi
];
checkInputs = [
pytestCheckHook
mock
numpy
shapely
pandas
xarray
];
preCheck = ''
# We need to build extensions locally to run tests
${python.interpreter} setup.py build_ext --inplace
cd test
'';
2020-12-01 03:02:52 +00:00
disabledTestPaths = [
"test_doctest_wrapper.py"
"test_datadir.py"
2020-12-01 03:02:52 +00:00
];
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_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-01 03:02:52 +00:00
];
2017-05-04 17:56:25 +01:00
meta = {
description = "Python interface to PROJ.4 library";
homepage = "https://github.com/pyproj4/pyproj";
2017-05-04 17:56:25 +01:00
license = with lib.licenses; [ isc ];
maintainers = with lib.maintainers; [ lsix ];
2017-05-04 17:56:25 +01:00
};
}