From 7a8db96d4fa43f55e5cda659e45fe2fd11bd957a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 20 Jan 2023 14:45:58 -0800 Subject: [PATCH] python310Packages.pyquery: 1.4.3 -> 2.0.0 https://github.com/gawel/pyquery/blob/2.0.0/CHANGES.rst --- .../python-modules/pyquery/default.nix | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pyquery/default.nix b/pkgs/development/python-modules/pyquery/default.nix index 40139c795677..0e1203b901b0 100644 --- a/pkgs/development/python-modules/pyquery/default.nix +++ b/pkgs/development/python-modules/pyquery/default.nix @@ -3,18 +3,23 @@ , cssselect , fetchPypi , lxml +, pytestCheckHook , pythonOlder +, requests +, webob +, webtest }: buildPythonPackage rec { pname = "pyquery"; - version = "1.4.3"; - disabled = pythonOlder "3.5"; + version = "2.0.0"; + disabled = pythonOlder "3.7"; + + format = "setuptools"; src = fetchPypi { inherit pname version; - extension = "zip"; - sha256 = "00p6f1dfma65192hc72dxd506491lsq3g5wgxqafi1xpg2w1xia6"; + hash = "sha256-lj6NTpAmL/bY3sBy6pcoXcN0ovacrXd29AgqvPah2K4="; }; propagatedBuildInputs = [ @@ -22,10 +27,23 @@ buildPythonPackage rec { lxml ]; - # circular dependency on webtest - doCheck = false; pythonImportsCheck = [ "pyquery" ]; + checkInputs = [ + pytestCheckHook + requests + webob + (webtest.overridePythonAttrs (_: { + # circular dependency + doCheck = false; + })) + ]; + + pytestFlagsArray = [ + # requires network + "--deselect=tests/test_pyquery.py::TestWebScrappingEncoding::test_get" + ]; + meta = with lib; { description = "A jquery-like library for Python"; homepage = "https://github.com/gawel/pyquery";