mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
Diff: https://github.com/rushter/selectolax/compare/v0.4.7...v0.4.10
Changelog: https://github.com/rushter/selectolax/blob/v0.4.10/CHANGES.md
(cherry picked from commit 2bad535bb1)
62 lines
1.2 KiB
Nix
62 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
replaceVars,
|
|
setuptools,
|
|
cython,
|
|
modest,
|
|
lexbor,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "selectolax";
|
|
version = "0.4.10";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rushter";
|
|
repo = "selectolax";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-kLzeAz5dEUnD9zMN2iWt2FOCoF7MFpkjloB35wnB7VU=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
})
|