nav: init at 1.2.1 (#356071)
[NixPkgs.git] / pkgs / development / python-modules / sanic-auth / default.nix
blob27555052af9c08cfb91cf018a2ef2140d4b8a2fd
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   setuptools,
6   sanic,
7   sanic-testing,
8   pytestCheckHook,
9 }:
11 buildPythonPackage rec {
12   pname = "sanic-auth";
13   version = "0.3.0";
14   pyproject = true;
16   src = fetchPypi {
17     pname = "Sanic-Auth";
18     inherit version;
19     hash = "sha256-KAU066S70GO1hURQrW0n+L5/kFzpgen341hlia0ngjU=";
20   };
22   build-system = [ setuptools ];
24   dependencies = [ sanic ];
26   nativeCheckInputs = [
27     pytestCheckHook
28     sanic-testing
29   ];
31   disabledTests = [
32     # incompatible with sanic>=22.3.0
33     "test_login_required"
34   ];
36   postPatch = ''
37     # Support for httpx>=0.20.0
38     substituteInPlace tests/test_auth.py \
39       --replace-fail "allow_redirects=False" "follow_redirects=False"
40   '';
42   pythonImportsCheck = [ "sanic_auth" ];
44   meta = with lib; {
45     description = "Simple Authentication for Sanic";
46     homepage = "https://github.com/pyx/sanic-auth/";
47     license = licenses.bsdOriginal;
48     maintainers = with maintainers; [ arnoldfarkas ];
49   };