summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-11-05 22:49:19 +0100
committerJonathan Ringer <jonringer117@gmail.com>2021-11-30 18:53:01 -0800
commit3b032c60a5b3295b657ff5454a08178bc11f6913 (patch)
treeccc648d17ebebb73cefb17e0fa473dcdc0b92619
parentpython3Packages.sanic: disable redirect tests (diff)
downloadnixpkgs-3b032c60a5b3295b657ff5454a08178bc11f6913.tar.gz
python3Packages.sanic-auth: support later httpx releases
-rw-r--r--pkgs/development/python-modules/sanic-auth/default.nix30
1 files changed, 25 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/sanic-auth/default.nix b/pkgs/development/python-modules/sanic-auth/default.nix
index 38d73d461c2d..c854017ae782 100644
--- a/pkgs/development/python-modules/sanic-auth/default.nix
+++ b/pkgs/development/python-modules/sanic-auth/default.nix
@@ -1,24 +1,44 @@
-{ lib, buildPythonPackage, fetchPypi, sanic, sanic-testing, pytestCheckHook }:
+{ lib
+, buildPythonPackage
+, fetchPypi
+, sanic
+, sanic-testing
+, pytestCheckHook
+}:
buildPythonPackage rec {
pname = "Sanic-Auth";
version = "0.3.0";
+ format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "0dc24ynqjraqwgvyk0g9bj87zgpq4xnssl24hnsn7l5vlkmk8198";
};
- propagatedBuildInputs = [ sanic ];
+ propagatedBuildInputs = [
+ sanic
+ ];
- checkInputs = [ pytestCheckHook sanic-testing ];
+ checkInputs = [
+ pytestCheckHook
+ sanic-testing
+ ];
- pythonImportsCheck = [ "sanic_auth" ];
+ postPatch = ''
+ # Support for httpx>=0.20.0
+ substituteInPlace tests/test_auth.py \
+ --replace "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 = [ maintainers.arnoldfarkas ];
+ maintainers = with maintainers; [ arnoldfarkas ];
};
}