at master 1.0 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 libmaxminddb, 7 pytestCheckHook, 8 pythonOlder, 9}: 10 11buildPythonPackage rec { 12 pname = "maxminddb"; 13 version = "2.8.2"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchPypi { 19 inherit pname version; 20 hash = "sha256-JqjlNiKNjMKMW49XSlcaJwS+/OOzaM7KWTp21WtlkPk="; 21 }; 22 23 buildInputs = [ libmaxminddb ]; 24 25 nativeCheckInputs = [ pytestCheckHook ]; 26 27 pythonImportsCheck = [ "maxminddb" ]; 28 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" ]; 32 33 meta = with lib; { 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; 38 maintainers = [ ]; 39 }; 40}