2019-08-01 19:27:35 +01:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, python, pkgs, pythonOlder, substituteAll
|
2019-07-10 01:42:01 +01:00
|
|
|
, aenum
|
2018-11-25 11:47:19 +00:00
|
|
|
, cython
|
2019-07-10 01:42:01 +01:00
|
|
|
, pytest
|
|
|
|
, mock
|
|
|
|
, numpy
|
2017-05-04 17:56:25 +01:00
|
|
|
}:
|
|
|
|
|
2019-07-10 01:42:01 +01:00
|
|
|
buildPythonPackage rec {
|
2017-05-04 17:56:25 +01:00
|
|
|
pname = "pyproj";
|
2019-08-01 19:27:35 +01:00
|
|
|
version = "2.2.2";
|
2017-05-04 17:56:25 +01:00
|
|
|
|
2019-08-01 19:27:35 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pyproj4";
|
|
|
|
repo = "pyproj";
|
|
|
|
rev = "v${version}rel";
|
|
|
|
sha256 = "0mb0jczgqh3sma69k7237i38h09gxgmvmddls9hpw4f3131f5ax7";
|
2017-05-04 17:56:25 +01:00
|
|
|
};
|
|
|
|
|
2019-07-10 01:42:01 +01:00
|
|
|
# force pyproj to use ${pkgs.proj}
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./001.proj.patch;
|
|
|
|
proj = pkgs.proj;
|
|
|
|
})
|
|
|
|
];
|
2018-11-25 11:47:19 +00:00
|
|
|
|
2019-07-10 01:42:01 +01:00
|
|
|
buildInputs = [ cython pkgs.proj ];
|
2017-05-04 17:56:25 +01:00
|
|
|
|
2019-07-10 01:42:01 +01: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
|
2017-05-17 22:40:07 +01:00
|
|
|
checkPhase = ''
|
2019-07-10 01:42:01 +01:00
|
|
|
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-17 22:40:07 +01:00
|
|
|
'';
|
2017-05-04 17:56:25 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Python interface to PROJ.4 library";
|
2019-07-10 01:42:01 +01:00
|
|
|
homepage = "https://github.com/jswhit/pyproj";
|
2017-05-04 17:56:25 +01:00
|
|
|
license = with lib.licenses; [ isc ];
|
|
|
|
};
|
2019-07-10 01:42:01 +01:00
|
|
|
}
|