2017-05-04 18:56:25 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
2017-05-17 23:40:07 +02:00
|
|
|
, nose2
|
|
|
|
, proj ? null
|
2017-05-04 18:56:25 +02:00
|
|
|
}:
|
|
|
|
|
2017-05-17 23:40:07 +02:00
|
|
|
buildPythonPackage (rec {
|
2017-05-04 18:56:25 +02:00
|
|
|
pname = "pyproj";
|
|
|
|
version = "1.9.5.1";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "53fa54c8fa8a1dfcd6af4bf09ce1aae5d4d949da63b90570ac5ec849efaf3ea8";
|
|
|
|
};
|
|
|
|
|
2017-05-17 23:40:07 +02:00
|
|
|
buildInputs = [ nose2 ];
|
2017-05-04 18:56:25 +02:00
|
|
|
|
2017-05-17 23:40:07 +02:00
|
|
|
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
|
|
|
|
'';
|
2017-05-04 18:56:25 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Python interface to PROJ.4 library";
|
2017-11-10 22:13:27 +01:00
|
|
|
homepage = https://github.com/jswhit/pyproj;
|
2017-05-04 18:56:25 +02:00
|
|
|
license = with lib.licenses; [ isc ];
|
|
|
|
};
|
2017-05-17 23:40:07 +02:00
|
|
|
} // (if proj == null then {} else { PROJ_DIR = proj; }))
|