Files
nixpkgs/pkgs/development/python-modules/maxminddb/default.nix

45 lines
1.1 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
libmaxminddb,
pytestCheckHook,
setuptools-scm,
setuptools,
}:
buildPythonPackage (finalAttrs: {
pname = "maxminddb";
version = "3.1.1";
pyproject = true;
src = fetchPypi {
inherit (finalAttrs) pname version;
hash = "sha256-sZqTjEgVGPGaLFNP/cs7xZWC8Pu9z5+BrJrfkSoK9oY=";
};
build-system = [
setuptools
setuptools-scm
];
buildInputs = [ libmaxminddb ];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "maxminddb" ];
# The multiprocessing tests fail on Darwin because multiprocessing uses spawn instead of fork,
# resulting in an exception when it cant pickle the `lookup` local function.
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "multiprocessing" ];
meta = {
description = "Reader for the MaxMind DB format";
homepage = "https://github.com/maxmind/MaxMind-DB-Reader-python";
changelog = "https://github.com/maxmind/MaxMind-DB-Reader-python/blob/v${finalAttrs.version}/HISTORY.rst";
license = lib.licenses.asl20;
maintainers = [ ];
};
})