python3Packages.geoip2: 3.0.0 -> 4.0.2

authored by

Martin Weinelt and committed by
Jon
d33659e9 e157891b

+11 -6
+11 -6
pkgs/development/python-modules/geoip2/default.nix
··· 1 1 { buildPythonPackage, lib, fetchPypi, isPy27 2 - , ipaddress 2 + , aiohttp 3 3 , maxminddb 4 4 , mock 5 + , mocket 5 6 , requests 6 7 , requests-mock 7 8 }: 8 9 9 10 buildPythonPackage rec { 10 - version = "3.0.0"; 11 + version = "4.0.2"; 11 12 pname = "geoip2"; 13 + disabled = isPy27; 12 14 13 15 src = fetchPypi { 14 16 inherit pname version; 15 - sha256 = "1q1ciqqd0qjkpgwsg9fws8wcqchkcq84gv2g4q3xgh2lpj3yjsaq"; 17 + sha256 = "06q9r5sdmncj4yaxrdf0mls05jb5n6pwhf8j8r74825cks4mvysa"; 16 18 }; 17 19 18 - propagatedBuildInputs = [ requests maxminddb ] 19 - ++ lib.optionals isPy27 [ ipaddress ]; 20 + patchPhase = '' 21 + substituteInPlace requirements.txt --replace "requests>=2.24.0,<3.0.0" "requests" 22 + ''; 20 23 21 - checkInputs = [ requests-mock ]; 24 + propagatedBuildInputs = [ aiohttp requests maxminddb ]; 25 + 26 + checkInputs = [ mocket requests-mock ]; 22 27 23 28 meta = with lib; { 24 29 description = "MaxMind GeoIP2 API";