depot/third_party/nixpkgs/pkgs/development/python-modules/geoip2/default.nix
Default email 0eaa97ffad Project import generated by Copybara.
GitOrigin-RevId: c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38
2020-08-20 19:08:02 +02:00

34 lines
726 B
Nix

{ buildPythonPackage, lib, fetchPypi, isPy27
, aiohttp
, maxminddb
, mock
, mocket
, requests
, requests-mock
}:
buildPythonPackage rec {
version = "4.0.2";
pname = "geoip2";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "06q9r5sdmncj4yaxrdf0mls05jb5n6pwhf8j8r74825cks4mvysa";
};
patchPhase = ''
substituteInPlace requirements.txt --replace "requests>=2.24.0,<3.0.0" "requests"
'';
propagatedBuildInputs = [ aiohttp requests maxminddb ];
checkInputs = [ mocket requests-mock ];
meta = with lib; {
description = "MaxMind GeoIP2 API";
homepage = "https://www.maxmind.com/en/home";
license = licenses.asl20;
maintainers = with maintainers; [ ];
};
}