2017-05-04 17:56:25 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2018-11-25 11:47:19 +00:00
|
|
|
, fetchFromGitHub
|
2017-05-04 17:56:25 +01:00
|
|
|
, python
|
2017-05-17 22:40:07 +01:00
|
|
|
, nose2
|
2018-11-25 11:47:19 +00:00
|
|
|
, cython
|
2017-05-17 22:40:07 +01:00
|
|
|
, proj ? null
|
2017-05-04 17:56:25 +01:00
|
|
|
}:
|
|
|
|
|
2017-05-17 22:40:07 +01:00
|
|
|
buildPythonPackage (rec {
|
2017-05-04 17:56:25 +01:00
|
|
|
pname = "pyproj";
|
2018-11-25 11:47:19 +00:00
|
|
|
version = "unstable-2018-11-13";
|
2017-05-04 17:56:25 +01:00
|
|
|
|
2018-11-25 11:47:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jswhit";
|
|
|
|
repo = pname;
|
|
|
|
rev = "78540f5ff40da92160f80860416c91ee74b7643c";
|
|
|
|
sha256 = "1vq5smxmpdjxialxxglsfh48wx8kaq9sc5mqqxn4fgv1r5n1m3n9";
|
2017-05-04 17:56:25 +01:00
|
|
|
};
|
|
|
|
|
2018-11-25 11:47:19 +00:00
|
|
|
buildInputs = [ cython ];
|
|
|
|
|
|
|
|
checkInputs = [ nose2 ];
|
2017-05-04 17:56:25 +01:00
|
|
|
|
2017-05-17 22:40:07 +01: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 17:56:25 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Python interface to PROJ.4 library";
|
2017-11-10 21:13:27 +00:00
|
|
|
homepage = https://github.com/jswhit/pyproj;
|
2017-05-04 17:56:25 +01:00
|
|
|
license = with lib.licenses; [ isc ];
|
|
|
|
};
|
2017-05-17 22:40:07 +01:00
|
|
|
} // (if proj == null then {} else { PROJ_DIR = proj; }))
|