python310Packages.geoip2: add changelog to meta

python310Packages.geoip2: remove postPatch section

python311Packages.geoip2: disable failing tests
This commit is contained in:
Fabian Affolter 2023-02-20 11:35:03 +01:00
parent edcfe3f6b9
commit 65f898d6e4

View File

@ -1,28 +1,35 @@
{ buildPythonPackage, lib, fetchPypi, pythonOlder
{ lib
, aiohttp
, buildPythonPackage
, fetchPypi
, maxminddb
, mocket
, pytestCheckHook
, pythonAtLeast
, pythonOlder
, requests
, requests-mock
, urllib3
, pytestCheckHook
}:
buildPythonPackage rec {
version = "4.6.0";
pname = "geoip2";
version = "4.6.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-8OgLzoCwa7OL0Iv0h31ahONU6TIJXmzPtNJ7tZj6T4M=";
hash = "sha256-8OgLzoCwa7OL0Iv0h31ahONU6TIJXmzPtNJ7tZj6T4M=";
};
patchPhase = ''
substituteInPlace requirements.txt --replace "requests>=2.24.0,<3.0.0" "requests"
'';
propagatedBuildInputs = [ aiohttp maxminddb requests urllib3 ];
propagatedBuildInputs = [
aiohttp
maxminddb
requests
urllib3
];
nativeCheckInputs = [
mocket
@ -30,11 +37,21 @@ buildPythonPackage rec {
pytestCheckHook
];
pythonImportsCheck = [ "geoip2" ];
pythonImportsCheck = [
"geoip2"
];
disabledTests = lib.optionals (pythonAtLeast "3.11") [
# https://github.com/maxmind/GeoIP2-python/pull/136
"TestAsyncClient"
] ++ lib.optionals (pythonAtLeast "3.10") [
"test_request"
];
meta = with lib; {
description = "GeoIP2 webservice client and database reader";
homepage = "https://github.com/maxmind/GeoIP2-python";
changelog = "https://github.com/maxmind/GeoIP2-python/blob/v${version}/HISTORY.rst";
license = licenses.asl20;
maintainers = with maintainers; [ ];
};