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

58 lines
1.4 KiB
Nix
Raw Normal View History

2020-03-24 21:12:58 +00:00
{ lib, buildPythonPackage, fetchFromGitHub, python, pkgs, pythonOlder, isPy27, substituteAll
, aenum
, cython
, pytest
, mock
, numpy
2020-03-24 21:12:58 +00:00
, shapely
2017-05-04 16:56:25 +00:00
}:
buildPythonPackage rec {
2017-05-04 16:56:25 +00:00
pname = "pyproj";
2020-03-24 21:12:58 +00:00
version = "2.6.0";
disabled = isPy27;
2017-05-04 16:56:25 +00:00
2019-08-01 18:27:35 +00:00
src = fetchFromGitHub {
owner = "pyproj4";
repo = "pyproj";
rev = "v${version}rel";
2020-03-24 21:12:58 +00:00
sha256 = "0fyggkbr3kp8mlq4c0r8sl5ah58bdg2mj4kzql9p3qyrkcdlgixh";
2017-05-04 16:56:25 +00:00
};
# force pyproj to use ${pkgs.proj}
patches = [
(substituteAll {
src = ./001.proj.patch;
proj = pkgs.proj;
2020-03-24 21:12:58 +00:00
projdev = pkgs.proj.dev;
})
];
buildInputs = [ cython pkgs.proj ];
2017-05-04 16:56:25 +00:00
propagatedBuildInputs = [
2020-03-24 21:12:58 +00:00
numpy shapely
] ++ lib.optional (pythonOlder "3.6") aenum;
checkInputs = [ pytest mock ];
# ignore rounding errors, and impure docgen
# datadir is ignored because it does the proj look up logic, which isn't relevant
checkPhase = ''
pytest . -k 'not alternative_grid_name \
and not transform_wgs84_to_alaska \
2020-03-24 21:12:58 +00:00
and not transformer_group__unavailable \
and not transform_group__missing_best \
and not datum \
and not repr' \
--ignore=test/test_doctest_wrapper.py \
--ignore=test/test_datadir.py
'';
2017-05-04 16:56:25 +00:00
meta = {
description = "Python interface to PROJ.4 library";
homepage = "https://github.com/jswhit/pyproj";
2017-05-04 16:56:25 +00:00
license = with lib.licenses; [ isc ];
};
}