2021-12-26 17:43:05 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, sanic
|
|
|
|
, sanic-testing
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "Sanic-Auth";
|
2021-01-09 10:05:03 +00:00
|
|
|
version = "0.3.0";
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "setuptools";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-01-09 10:05:03 +00:00
|
|
|
sha256 = "0dc24ynqjraqwgvyk0g9bj87zgpq4xnssl24hnsn7l5vlkmk8198";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
sanic
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
sanic-testing
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabledTests = [
|
|
|
|
# incompatible with sanic>=22.3.0
|
|
|
|
"test_login_required"
|
|
|
|
];
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Support for httpx>=0.20.0
|
|
|
|
substituteInPlace tests/test_auth.py \
|
|
|
|
--replace "allow_redirects=False" "follow_redirects=False"
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"sanic_auth"
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple Authentication for Sanic";
|
|
|
|
homepage = "https://github.com/pyx/sanic-auth/";
|
|
|
|
license = licenses.bsdOriginal;
|
2021-12-26 17:43:05 +00:00
|
|
|
maintainers = with maintainers; [ arnoldfarkas ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|