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

52 lines
1.2 KiB
Nix
Raw Normal View History

2019-08-01 18:27:35 +00:00
{ lib, buildPythonPackage, fetchFromGitHub, python, pkgs, pythonOlder, substituteAll
, aenum
, cython
, pytest
, mock
, numpy
2017-05-04 16:56:25 +00:00
}:
buildPythonPackage rec {
2017-05-04 16:56:25 +00:00
pname = "pyproj";
2019-08-01 18:27:35 +00:00
version = "2.2.2";
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";
sha256 = "0mb0jczgqh3sma69k7237i38h09gxgmvmddls9hpw4f3131f5ax7";
2017-05-04 16:56:25 +00:00
};
# force pyproj to use ${pkgs.proj}
patches = [
(substituteAll {
src = ./001.proj.patch;
proj = pkgs.proj;
})
];
buildInputs = [ cython pkgs.proj ];
2017-05-04 16:56:25 +00:00
propagatedBuildInputs = [
numpy
] ++ 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 \
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 ];
};
}