From f06f4663d207a28f8823ee79f4acf74d42881b55 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 29 May 2022 12:43:27 +0200 Subject: [PATCH 1/2] python310Packages.wsgiproxy2: 0.4.2 -> 0.5.1 --- .../python-modules/wsgiproxy2/default.nix | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/wsgiproxy2/default.nix b/pkgs/development/python-modules/wsgiproxy2/default.nix index 2a9856cdd086..0f50c6474c59 100644 --- a/pkgs/development/python-modules/wsgiproxy2/default.nix +++ b/pkgs/development/python-modules/wsgiproxy2/default.nix @@ -1,30 +1,39 @@ { lib , buildPythonPackage -, fetchPypi -, six +, fetchFromGitHub , webob +, pythonOlder }: buildPythonPackage rec { - pname = "WSGIProxy2"; - version = "0.4.2"; + pname = "wsgiproxy2"; + version = "0.5.1"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - extension = "zip"; - sha256 = "13kf9bdxrc95y9vriaz0viry3ah11nz4rlrykcfvb8nlqpx3dcm4"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "gawel"; + repo = "WSGIProxy2"; + rev = version; + hash = "sha256-ouofw3cBQzBwSh3Pdtdl7KI2pg/T/z3qoh8zoeiKiSs="; }; - propagatedBuildInputs = [ six webob ]; + propagatedBuildInputs = [ + webob + ]; - # circular dep on webtest + # Circular dependency on webtest doCheck = false; + pythonImportsCheck = [ + "wsgiproxy" + ]; + meta = with lib; { - homepage = "http://pythonpaste.org/wsgiproxy/"; description = "HTTP proxying tools for WSGI apps"; + homepage = "https://wsgiproxy2.readthedocs.io/"; license = licenses.mit; maintainers = with maintainers; [ domenkozar ]; }; - } From bf399d0d1e6de4844d05aad105d57d9d5d622e83 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 29 May 2022 00:11:56 +0200 Subject: [PATCH 2/2] python310Packages.webtest: disable on older Python releases --- .../python-modules/webtest/default.nix | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/pkgs/development/python-modules/webtest/default.nix b/pkgs/development/python-modules/webtest/default.nix index 8ec42598ee61..50e7a1c73e61 100644 --- a/pkgs/development/python-modules/webtest/default.nix +++ b/pkgs/development/python-modules/webtest/default.nix @@ -1,55 +1,54 @@ { lib +, beautifulsoup4 , buildPythonPackage , fetchPypi -, isPy27 -, webob -, six -, beautifulsoup4 -, waitress -, pyquery -, wsgiproxy2 , pastedeploy +, pyquery , pytestCheckHook +, pythonOlder +, six +, waitress +, webob +, wsgiproxy2 }: buildPythonPackage rec { - version = "3.0.0"; pname = "webtest"; - disabled = isPy27; # paste.deploy is not longer a valid import + version = "3.0.0"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { pname = "WebTest"; inherit version; - sha256 = "54bd969725838d9861a9fa27f8d971f79d275d94ae255f5c501f53bb6d9929eb"; + hash = "sha256-VL2WlyWDjZhhqfon+Nlx950nXZSuJV9cUB9Tu22ZKes="; }; - postPatch = '' - substituteInPlace setup.py --replace "nose<1.3.0" "nose" - ''; - propagatedBuildInputs = [ - webob - six beautifulsoup4 + six waitress + webob ]; checkInputs = [ - pytestCheckHook pastedeploy - wsgiproxy2 pyquery + pytestCheckHook + wsgiproxy2 ]; - # Some of the tests use localhost networking. __darwinAllowLocalNetworking = true; - pythonImportsCheck = [ "webtest" ]; + pythonImportsCheck = [ + "webtest" + ]; meta = with lib; { description = "Helper to test WSGI applications"; - homepage = "https://webtest.readthedocs.org/en/latest/"; + homepage = "https://webtest.readthedocs.org/"; license = licenses.mit; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ fab ]; }; }