depot/third_party/nixpkgs/pkgs/development/python-modules/maxminddb/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

40 lines
1 KiB
Nix
Raw 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,
pythonOlder,
}:
buildPythonPackage rec {
pname = "maxminddb";
version = "2.6.2";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-fYQtMuJiCryJS315paEAemnfLGzyeaBrlMnDkT9m8mQ=";
};
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.isDarwin [ "multiprocessing" ];
meta = with lib; {
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${version}/HISTORY.rst";
license = licenses.asl20;
maintainers = with maintainers; [ ];
};
}