mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 21:13:40 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
53 lines
901 B
Nix
53 lines
901 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, cssselect
|
|
, fetchPypi
|
|
, lxml
|
|
, packaging
|
|
, psutil
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, w3lib
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "parsel";
|
|
version = "1.7.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-AlQTPLAwTeE/zEhXu4IU/3DWmIcnYfpr6DdOG7vVgZI=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace '"pytest-runner",' ""
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
cssselect
|
|
lxml
|
|
packaging
|
|
w3lib
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
psutil
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"parsel"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python library to extract data from HTML and XML using XPath and CSS selectors";
|
|
homepage = "https://github.com/scrapy/parsel";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|