1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, cmake
5, python
6, libosmium
7, protozero
8, boost
9, expat
10, bzip2
11, zlib
12, pybind11
13, shapely
14, pythonOlder
15, isPyPy
16, lz4
17, requests
18, pytestCheckHook
19}:
20
21buildPythonPackage rec {
22 pname = "pyosmium";
23 version = "3.6.0";
24 format = "setuptools";
25
26 disabled = pythonOlder "3.6" || isPyPy;
27
28 src = fetchFromGitHub {
29 owner = "osmcode";
30 repo = pname;
31 rev = "refs/tags/v${version}";
32 hash = "sha256-+YJQGPQm2FGOPhNzlXX2GM+ad4QdipJhwViOKGHtqBk=";
33 };
34
35 nativeBuildInputs = [
36 cmake
37 ];
38
39 buildInputs = [
40 libosmium
41 protozero
42 boost
43 expat
44 bzip2
45 zlib
46 pybind11
47 lz4
48 ];
49
50 propagatedBuildInputs = [
51 requests
52 ];
53
54 preBuild = "cd ..";
55
56 nativeCheckInputs = [
57 pytestCheckHook
58 shapely
59 ];
60
61 meta = with lib; {
62 description = "Python bindings for libosmium";
63 homepage = "https://osmcode.org/pyosmium";
64 changelog = "https://github.com/osmcode/pyosmium/blob/v${version}/CHANGELOG.md";
65 license = licenses.bsd2;
66 maintainers = with maintainers; [ sikmir ];
67 };
68}