1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 cmake,
6 libosmium,
7 protozero,
8 boost,
9 expat,
10 bzip2,
11 zlib,
12 pybind11,
13 pythonOlder,
14 pytest-httpserver,
15 pytestCheckHook,
16 shapely,
17 werkzeug,
18 isPyPy,
19 lz4,
20 requests,
21}:
22
23buildPythonPackage rec {
24 pname = "pyosmium";
25 version = "3.7.0";
26 format = "setuptools";
27
28 disabled = pythonOlder "3.6" || isPyPy;
29
30 src = fetchFromGitHub {
31 owner = "osmcode";
32 repo = pname;
33 rev = "refs/tags/v${version}";
34 hash = "sha256-DBFDAKNrD93MRXjoM8dIJQ/HJ9Aj8oMJuPVQxTrKYfI=";
35 };
36
37 nativeBuildInputs = [ cmake ];
38
39 buildInputs = [
40 libosmium
41 protozero
42 boost
43 expat
44 bzip2
45 zlib
46 pybind11
47 lz4
48 ];
49
50 propagatedBuildInputs = [ requests ];
51
52 preBuild = "cd ..";
53
54 nativeCheckInputs = [
55 pytestCheckHook
56 shapely
57 werkzeug
58 pytest-httpserver
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}