at 25.11-pre 1.3 kB view raw
1{ 2 lib, 3 aiohttp, 4 buildPythonPackage, 5 fetchPypi, 6 h11, 7 maxminddb, 8 mocket, 9 pytestCheckHook, 10 pythonAtLeast, 11 pythonOlder, 12 requests-mock, 13 pytest-httpserver, 14 requests, 15 setuptools-scm, 16 setuptools, 17 urllib3, 18}: 19 20buildPythonPackage rec { 21 pname = "geoip2"; 22 version = "5.0.1"; 23 pyproject = true; 24 25 disabled = pythonOlder "3.6"; 26 27 src = fetchPypi { 28 inherit pname version; 29 hash = "sha256-kK+LbTaH877yUfJwitAXsw1ifRFEwAQOq8TJAXqAfYY="; 30 }; 31 32 build-system = [ 33 setuptools 34 setuptools-scm 35 ]; 36 37 propagatedBuildInputs = [ 38 aiohttp 39 maxminddb 40 requests 41 urllib3 42 ]; 43 44 nativeCheckInputs = [ 45 h11 46 mocket 47 requests-mock 48 pytestCheckHook 49 pytest-httpserver 50 ]; 51 52 pythonImportsCheck = [ "geoip2" ]; 53 54 disabledTests = 55 lib.optionals (pythonAtLeast "3.10") [ 56 # https://github.com/maxmind/GeoIP2-python/pull/136 57 "TestAsyncClient" 58 ] 59 ++ lib.optionals (pythonAtLeast "3.10") [ "test_request" ]; 60 61 meta = with lib; { 62 description = "GeoIP2 webservice client and database reader"; 63 homepage = "https://github.com/maxmind/GeoIP2-python"; 64 changelog = "https://github.com/maxmind/GeoIP2-python/blob/v${version}/HISTORY.rst"; 65 license = licenses.asl20; 66 maintainers = [ ]; 67 }; 68}