depot/third_party/nixpkgs/pkgs/development/python-modules/pyosmium/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

76 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, cmake
, libosmium
, protozero
, boost
, expat
, bzip2
, zlib
, pybind11
, shapely
, pythonOlder
, isPyPy
, lz4
, requests
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pyosmium";
version = "3.7.0";
format = "setuptools";
disabled = pythonOlder "3.6" || isPyPy;
src = fetchFromGitHub {
owner = "osmcode";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-DBFDAKNrD93MRXjoM8dIJQ/HJ9Aj8oMJuPVQxTrKYfI=";
};
patches = [
# Compatibility with recent pybind versions
(fetchpatch {
url = "https://github.com/osmcode/pyosmium/commit/31b1363389b423f49e14140ce868ecac83e92f69.patch";
hash = "sha256-maBuwzyZ4/wVLLGVr4gZFZDKvJckUXiBluxZRPGETag=";
})
];
nativeBuildInputs = [
cmake
];
buildInputs = [
libosmium
protozero
boost
expat
bzip2
zlib
pybind11
lz4
];
propagatedBuildInputs = [
requests
];
preBuild = "cd ..";
nativeCheckInputs = [
pytestCheckHook
shapely
];
meta = with lib; {
description = "Python bindings for libosmium";
homepage = "https://osmcode.org/pyosmium";
changelog = "https://github.com/osmcode/pyosmium/blob/v${version}/CHANGELOG.md";
license = licenses.bsd2;
maintainers = with maintainers; [ sikmir ];
};
}