Merge pull request #25870 from risicle/pyproj-tests
pyproj: enable tests, use bundled proj by default
This commit is contained in:
commit
61451f1011
@ -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; }))
|
||||
|
@ -19894,7 +19894,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}";
|
||||
|
Loading…
Reference in New Issue
Block a user