pythonPackages.pyproj: unstable-2018-11-13 -> 2.2.1
This commit is contained in:
@@ -1,38 +1,49 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, python
|
||||
, nose2
|
||||
{ lib, buildPythonPackage, fetchPypi, python, pkgs, pythonOlder, substituteAll
|
||||
, aenum
|
||||
, cython
|
||||
, proj ? null
|
||||
, pytest
|
||||
, mock
|
||||
, numpy
|
||||
}:
|
||||
|
||||
buildPythonPackage (rec {
|
||||
buildPythonPackage rec {
|
||||
pname = "pyproj";
|
||||
version = "unstable-2018-11-13";
|
||||
version = "2.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jswhit";
|
||||
repo = pname;
|
||||
rev = "78540f5ff40da92160f80860416c91ee74b7643c";
|
||||
sha256 = "1vq5smxmpdjxialxxglsfh48wx8kaq9sc5mqqxn4fgv1r5n1m3n9";
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0yigcxwmx5cczipf2mpmy2gq1dnl0635yjvjq86ay47j1j5fd2gc";
|
||||
};
|
||||
|
||||
buildInputs = [ cython ];
|
||||
# force pyproj to use ${pkgs.proj}
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./001.proj.patch;
|
||||
proj = pkgs.proj;
|
||||
})
|
||||
];
|
||||
|
||||
checkInputs = [ nose2 ];
|
||||
buildInputs = [ cython pkgs.proj ];
|
||||
|
||||
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 = ''
|
||||
runHook preCheck
|
||||
pushd unittest # changing directory should ensure we're importing the global pyproj
|
||||
${python.interpreter} test.py && ${python.interpreter} -c "import doctest, pyproj, sys; sys.exit(doctest.testmod(pyproj)[0])"
|
||||
popd
|
||||
runHook postCheck
|
||||
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
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Python interface to PROJ.4 library";
|
||||
homepage = https://github.com/jswhit/pyproj;
|
||||
homepage = "https://github.com/jswhit/pyproj";
|
||||
license = with lib.licenses; [ isc ];
|
||||
};
|
||||
} // (if proj == null then {} else { PROJ_DIR = proj; }))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user