Files
nixpkgs/pkgs/development/python-modules/hishel/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

73 lines
1.4 KiB
Nix

{
lib,
anysqlite,
boto3,
buildPythonPackage,
fetchFromGitHub,
hatch-fancy-pypi-readme,
hatchling,
httpx,
moto,
pytest-asyncio,
pytestCheckHook,
pyyaml,
redis,
trio,
}:
buildPythonPackage rec {
pname = "hishel";
version = "0.1.3";
pyproject = true;
src = fetchFromGitHub {
owner = "karpetrosyan";
repo = "hishel";
tag = version;
hash = "sha256-3dcXj9MPPtHBzafdccrOeh+Wrn9hulDA8L3itOe8ZXw=";
};
build-system = [
hatch-fancy-pypi-readme
hatchling
];
dependencies = [ httpx ];
optional-dependencies = {
redis = [ redis ];
s3 = [ boto3 ];
sqlite = [ anysqlite ];
yaml = [ pyyaml ];
};
nativeCheckInputs = [
moto
pytest-asyncio
pytestCheckHook
trio
]
++ lib.concatAttrValues optional-dependencies;
pythonImportsCheck = [ "hishel" ];
disabledTests = [
# Tests require a running Redis instance
"test_redis"
];
disabledTestPaths = [
# ImportError: cannot import name 'mock_s3' from 'moto'
"tests/_async/test_storages.py"
"tests/_sync/test_storages.py"
];
meta = {
description = "HTTP Cache implementation for HTTPX and HTTP Core";
homepage = "https://github.com/karpetrosyan/hishel";
changelog = "https://github.com/karpetrosyan/hishel/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ fab ];
};
}