mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-25 18:10:37 +00:00
Diff: https://github.com/rushter/selectolax/compare/v0.4.10...v0.4.11 Changelog: https://github.com/rushter/selectolax/blob/v0.4.11/CHANGES.md
63 lines
1.2 KiB
Nix
63 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
replaceVars,
|
|
setuptools,
|
|
cython,
|
|
modest,
|
|
lexbor,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "selectolax";
|
|
version = "0.4.11";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rushter";
|
|
repo = "selectolax";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-YNYgAWaAaK4L/GfSnI+pX3XQ9/hXc7/kjkKUb1orStM=";
|
|
};
|
|
|
|
patches = [
|
|
(replaceVars ./0001-setup.py-devendor-modest-and-lexbor.patch {
|
|
modest = lib.getDev modest;
|
|
lexbor = lib.getDev lexbor;
|
|
})
|
|
];
|
|
|
|
build-system = [
|
|
setuptools
|
|
cython
|
|
];
|
|
|
|
buildInputs = [
|
|
modest
|
|
lexbor
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
# shadows name and breaks imports in tests
|
|
preCheck = ''
|
|
rm -rf selectolax
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"selectolax"
|
|
];
|
|
|
|
meta = {
|
|
description = "Python binding to Modest and Lexbor engines. Fast HTML5 parser with CSS selectors for Python";
|
|
homepage = "https://github.com/rushter/selectolax";
|
|
changelog = "https://github.com/rushter/selectolax/blob/${finalAttrs.src.tag}/CHANGES.md";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ marcel ];
|
|
};
|
|
})
|