1{ lib, buildPythonPackage, fetchFromGitHub, cmake, python
2, libosmium, protozero, boost, expat, bzip2, zlib, pybind11
3, nose, shapely, mock, isPy3k }:
4
5buildPythonPackage rec {
6 pname = "pyosmium";
7 version = "2.15.3";
8
9 src = fetchFromGitHub {
10 owner = "osmcode";
11 repo = pname;
12 rev = "v${version}";
13 sha256 = "1523ym9i4rnwi5kcp7n2lm67kxlhar8xlv91s394ixzwax9bgg7w";
14 };
15
16 nativeBuildInputs = [ cmake ];
17 buildInputs = [ libosmium protozero boost expat bzip2 zlib pybind11 ];
18
19 preBuild = "cd ..";
20
21 checkInputs = [ nose shapely ] ++ lib.optionals (!isPy3k) [ mock ];
22
23 checkPhase = "(cd test && ${python.interpreter} run_tests.py)";
24
25 meta = with lib; {
26 description = "Python bindings for libosmium";
27 homepage = "https://osmcode.org/pyosmium";
28 license = licenses.bsd2;
29 maintainers = with maintainers; [ sikmir ];
30 };
31}