2020-03-24 21:12:58 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, python, pkgs, pythonOlder, isPy27, substituteAll
|
2019-07-10 01:42:01 +01:00
|
|
|
, aenum
|
2018-11-25 11:47:19 +00:00
|
|
|
, cython
|
2020-12-01 03:02:52 +00:00
|
|
|
, pytestCheckHook
|
2019-07-10 01:42:01 +01:00
|
|
|
, mock
|
|
|
|
, numpy
|
2020-03-24 21:12:58 +00:00
|
|
|
, shapely
|
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";
|
2020-03-24 21:12:58 +00:00
|
|
|
version = "2.6.0";
|
|
|
|
disabled = isPy27;
|
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";
|
2020-03-24 21:12:58 +00:00
|
|
|
sha256 = "0fyggkbr3kp8mlq4c0r8sl5ah58bdg2mj4kzql9p3qyrkcdlgixh";
|
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;
|
2020-03-24 21:12:58 +00:00
|
|
|
projdev = pkgs.proj.dev;
|
2019-07-10 01:42:01 +01:00
|
|
|
})
|
|
|
|
];
|
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 = [
|
2020-03-24 21:12:58 +00:00
|
|
|
numpy shapely
|
2019-07-10 01:42:01 +01:00
|
|
|
] ++ lib.optional (pythonOlder "3.6") aenum;
|
|
|
|
|
2020-12-01 03:02:52 +00:00
|
|
|
checkInputs = [ pytestCheckHook mock ];
|
|
|
|
|
|
|
|
# prevent importing local directory
|
|
|
|
preCheck = "cd test";
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"--ignore=test_doctest_wrapper.py"
|
|
|
|
"--ignore=test_datadir.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
"alternative_grid_name"
|
|
|
|
"transform_wgs84_to_alaska"
|
|
|
|
"transformer_group__unavailable"
|
|
|
|
"transform_group__missing_best"
|
|
|
|
"datum"
|
|
|
|
"repr"
|
|
|
|
];
|
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
|
|
|
}
|