depot/third_party/nixpkgs/pkgs/development/python-modules/sanic-auth/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

50 lines
993 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
sanic,
sanic-testing,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "sanic-auth";
version = "0.3.0";
pyproject = true;
src = fetchPypi {
pname = "Sanic-Auth";
inherit version;
hash = "sha256-KAU066S70GO1hURQrW0n+L5/kFzpgen341hlia0ngjU=";
};
build-system = [ setuptools ];
dependencies = [ sanic ];
nativeCheckInputs = [
pytestCheckHook
sanic-testing
];
disabledTests = [
# incompatible with sanic>=22.3.0
"test_login_required"
];
postPatch = ''
# Support for httpx>=0.20.0
substituteInPlace tests/test_auth.py \
--replace-fail "allow_redirects=False" "follow_redirects=False"
'';
pythonImportsCheck = [ "sanic_auth" ];
meta = with lib; {
description = "Simple Authentication for Sanic";
homepage = "https://github.com/pyx/sanic-auth/";
license = licenses.bsdOriginal;
maintainers = with maintainers; [ arnoldfarkas ];
};
}