nixpkgs/pkgs/development/python-modules/pyquery/default.nix
Ihar Hrachyshka 567e8dfd8e
treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

67 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
cssselect,
fetchPypi,
lxml,
pytestCheckHook,
requests,
setuptools,
webob,
webtest,
}:
buildPythonPackage rec {
pname = "pyquery";
version = "2.0.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-AZS7JwaxLQN9sSxRko/p67NrctnnGVZdq6WmxZUyL68=";
};
build-system = [ setuptools ];
dependencies = [
cssselect
lxml
];
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "pyquery" ];
nativeCheckInputs = [
pytestCheckHook
requests
webob
(webtest.overridePythonAttrs (_: {
# circular dependency
doCheck = false;
}))
];
disabledTestPaths = [
# requires network
"tests/test_pyquery.py::TestWebScrappingEncoding::test_get"
];
disabledTests = [
# broken in libxml 2.14 update
# https://github.com/gawel/pyquery/issues/257
"test_val_for_textarea"
"test_replaceWith"
"test_replaceWith_with_function"
"test_get"
"test_post"
"test_session"
];
meta = {
description = "Jquery-like library for Python";
homepage = "https://github.com/gawel/pyquery";
changelog = "https://github.com/gawel/pyquery/blob/${version}/CHANGES.rst";
license = lib.licenses.bsd3;
};
}