2020-02-04 23:29:30 +01:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, cmake, python
|
|
|
|
, libosmium, protozero, boost, expat, bzip2, zlib, pybind11
|
2021-08-30 18:14:52 +02:00
|
|
|
, nose, shapely, pythonOlder, isPyPy, lz4, requests }:
|
2020-02-04 23:29:30 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyosmium";
|
2021-08-26 21:32:42 +02:00
|
|
|
version = "3.2.0";
|
2020-10-27 22:28:41 +01:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.4" || isPyPy;
|
2020-02-04 23:29:30 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "osmcode";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-08-26 21:32:42 +02:00
|
|
|
sha256 = "0s9h1blz4vrgcvdiikbpi2d4cy69kg2s8ki4dzampm1s0pa92if5";
|
2020-02-04 23:29:30 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2021-03-28 15:47:23 +02:00
|
|
|
buildInputs = [ libosmium protozero boost expat bzip2 zlib pybind11 lz4 ];
|
2021-08-30 18:14:52 +02:00
|
|
|
propagatedBuildInputs = [ requests ];
|
2020-02-04 23:29:30 +01:00
|
|
|
|
|
|
|
preBuild = "cd ..";
|
|
|
|
|
2020-10-27 22:28:41 +01:00
|
|
|
checkInputs = [ nose shapely ];
|
2020-02-04 23:29:30 +01:00
|
|
|
|
|
|
|
checkPhase = "(cd test && ${python.interpreter} run_tests.py)";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python bindings for libosmium";
|
|
|
|
homepage = "https://osmcode.org/pyosmium";
|
2021-03-28 15:47:23 +02:00
|
|
|
changelog = "https://github.com/osmcode/pyosmium/blob/v${version}/CHANGELOG.md";
|
2020-02-04 23:29:30 +01:00
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ sikmir ];
|
|
|
|
};
|
|
|
|
}
|