Files
nixpkgs/pkgs/development/python-modules/geoip2/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

64 lines
1.2 KiB
Nix

{
lib,
aiohttp,
buildPythonPackage,
fetchPypi,
h11,
maxminddb,
pytestCheckHook,
pythonAtLeast,
requests-mock,
pytest-httpserver,
requests,
setuptools-scm,
setuptools,
urllib3,
}:
buildPythonPackage rec {
pname = "geoip2";
version = "5.1.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-7j+H8M6TJetkhP4Yy9l3GgPQorrR3RVvo1hPr6Vi05o=";
};
build-system = [
setuptools
setuptools-scm
];
propagatedBuildInputs = [
aiohttp
maxminddb
requests
urllib3
];
nativeCheckInputs = [
h11
requests-mock
pytestCheckHook
pytest-httpserver
];
pythonImportsCheck = [ "geoip2" ];
disabledTests =
lib.optionals (pythonAtLeast "3.10") [
# https://github.com/maxmind/GeoIP2-python/pull/136
"TestAsyncClient"
]
++ lib.optionals (pythonAtLeast "3.10") [ "test_request" ];
meta = {
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 = lib.licenses.asl20;
maintainers = [ ];
};
}