at master 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 cssselect, 5 fetchPypi, 6 lxml, 7 pytestCheckHook, 8 requests, 9 setuptools, 10 webob, 11 webtest, 12}: 13 14buildPythonPackage rec { 15 pname = "pyquery"; 16 version = "2.0.1"; 17 pyproject = true; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-AZS7JwaxLQN9sSxRko/p67NrctnnGVZdq6WmxZUyL68="; 22 }; 23 24 build-system = [ setuptools ]; 25 26 dependencies = [ 27 cssselect 28 lxml 29 ]; 30 31 __darwinAllowLocalNetworking = true; 32 33 pythonImportsCheck = [ "pyquery" ]; 34 35 nativeCheckInputs = [ 36 pytestCheckHook 37 requests 38 webob 39 (webtest.overridePythonAttrs (_: { 40 # circular dependency 41 doCheck = false; 42 })) 43 ]; 44 45 disabledTestPaths = [ 46 # requires network 47 "tests/test_pyquery.py::TestWebScrappingEncoding::test_get" 48 ]; 49 50 disabledTests = [ 51 # broken in libxml 2.14 update 52 # https://github.com/gawel/pyquery/issues/257 53 "test_val_for_textarea" 54 "test_replaceWith" 55 "test_replaceWith_with_function" 56 "test_get" 57 "test_post" 58 "test_session" 59 ]; 60 61 meta = with lib; { 62 description = "Jquery-like library for Python"; 63 homepage = "https://github.com/gawel/pyquery"; 64 changelog = "https://github.com/gawel/pyquery/blob/${version}/CHANGES.rst"; 65 license = licenses.bsd3; 66 }; 67}