depot/third_party/nixpkgs/pkgs/development/python-modules/pyosmium/default.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

73 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
cmake,
libosmium,
protozero,
boost,
expat,
bzip2,
zlib,
pybind11,
pythonOlder,
pytest-httpserver,
pytestCheckHook,
setuptools,
shapely,
werkzeug,
isPyPy,
lz4,
requests,
}:
buildPythonPackage rec {
pname = "pyosmium";
version = "4.0.1";
pyproject = true;
disabled = pythonOlder "3.7" || isPyPy;
src = fetchFromGitHub {
owner = "osmcode";
repo = "pyosmium";
rev = "refs/tags/v${version}";
hash = "sha256-qi4GsjQVe2nIcvQThAlxQu3kUdWhRuJFHVPjKbMBxdM=";
};
build-system = [ setuptools ];
nativeBuildInputs = [ cmake ];
buildInputs = [
libosmium
protozero
boost
expat
bzip2
zlib
pybind11
lz4
];
dependencies = [ requests ];
preBuild = "cd ..";
nativeCheckInputs = [
pytestCheckHook
shapely
werkzeug
pytest-httpserver
];
__darwinAllowLocalNetworking = true;
meta = {
description = "Python bindings for libosmium";
homepage = "https://osmcode.org/pyosmium";
changelog = "https://github.com/osmcode/pyosmium/blob/v${version}/CHANGELOG.md";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ sikmir ];
};
}