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

61 lines
1.2 KiB
Nix
Raw Normal View History

2020-03-24 21:12:58 +00:00
{ lib, buildPythonPackage, fetchFromGitHub, python, pkgs, pythonOlder, isPy27, substituteAll
, aenum
, cython
2020-12-01 03:02:52 +00:00
, pytestCheckHook
, mock
, numpy
2020-03-24 21:12:58 +00:00
, shapely
2017-05-04 17:56:25 +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
};
# 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 17:56:25 +01:00
propagatedBuildInputs = [
2020-03-24 21:12:58 +00:00
numpy shapely
] ++ 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";
homepage = "https://github.com/jswhit/pyproj";
2017-05-04 17:56:25 +01:00
license = with lib.licenses; [ isc ];
};
}