pyproj: enable tests, use bundled proj by default

This commit is contained in:
Robert Scott 2017-05-17 22:40:07 +01:00
parent f2e2463367
commit d4c106f5b4
2 changed files with 17 additions and 7 deletions

View File

@ -1,11 +1,12 @@
{ lib
, buildPythonPackage
, fetchPypi
, proj
, python
, nose2
, proj ? null
}:
buildPythonPackage rec {
buildPythonPackage (rec {
pname = "pyproj";
version = "1.9.5.1";
name = "${pname}-${version}";
@ -15,14 +16,19 @@ buildPythonPackage rec {
sha256 = "53fa54c8fa8a1dfcd6af4bf09ce1aae5d4d949da63b90570ac5ec849efaf3ea8";
};
buildInputs = [ proj ];
buildInputs = [ nose2 ];
# Could not get tests working
doCheck = false;
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
'';
meta = {
description = "Python interface to PROJ.4 library";
homepage = http://github.com/jswhit/pyproj;
license = with lib.licenses; [ isc ];
};
}
} // (if proj == null then {} else { PROJ_DIR = proj; }))

View File

@ -19896,7 +19896,11 @@ in {
pyopencl = callPackage ../development/python-modules/pyopencl { };
pyproj = callPackage ../development/python-modules/pyproj { };
pyproj = callPackage ../development/python-modules/pyproj {
# pyproj does *work* if you want to use a system supplied proj, but with the current version(s) the tests fail by
# a few decimal places, so caveat emptor.
proj = null;
};
pyrr = buildPythonPackage rec {
name = "pyrr-${version}";