11 buildPythonPackage rec {
14 format = "setuptools";
16 disabled = pythonOlder "3.7";
19 inherit pname version;
20 hash = "sha256-fYQtMuJiCryJS315paEAemnfLGzyeaBrlMnDkT9m8mQ=";
23 buildInputs = [ libmaxminddb ];
25 nativeCheckInputs = [ pytestCheckHook ];
27 pythonImportsCheck = [ "maxminddb" ];
29 # The multiprocessing tests fail on Darwin because multiprocessing uses spawn instead of fork,
30 # resulting in an exception when it can’t pickle the `lookup` local function.
31 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [ "multiprocessing" ];
34 description = "Reader for the MaxMind DB format";
35 homepage = "https://github.com/maxmind/MaxMind-DB-Reader-python";
36 changelog = "https://github.com/maxmind/MaxMind-DB-Reader-python/blob/v${version}/HISTORY.rst";
37 license = licenses.asl20;