nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 cssselect,
5 fetchPypi,
6 hatchling,
7 jmespath,
8 lxml,
9 packaging,
10 psutil,
11 pytestCheckHook,
12 sybil,
13 w3lib,
14}:
15
16buildPythonPackage (finalAttrs: {
17 pname = "parsel";
18 version = "1.11.0";
19 pyproject = true;
20
21 src = fetchPypi {
22 inherit (finalAttrs) pname version;
23 hash = "sha256-WSX+CH6xb8QEp+2R4x4sHiqbIw2ktk802BNYwNDifog=";
24 };
25
26 build-system = [ hatchling ];
27
28 dependencies = [
29 cssselect
30 jmespath
31 lxml
32 packaging
33 w3lib
34 ];
35
36 nativeCheckInputs = [
37 psutil
38 pytestCheckHook
39 sybil
40 ];
41
42 pythonImportsCheck = [ "parsel" ];
43
44 disabledTests = [
45 # asserts on the exact output format of an error message
46 "test_set_xpathfunc"
47 ];
48
49 meta = {
50 description = "Python library to extract data from HTML and XML using XPath and CSS selectors";
51 homepage = "https://github.com/scrapy/parsel";
52 changelog = "https://github.com/scrapy/parsel/blob/v${finalAttrs.version}/NEWS";
53 license = lib.licenses.bsd3;
54 maintainers = with lib.maintainers; [ fab ];
55 };
56})