python3Packages.bleach: prune deps, refactor

This commit is contained in:
Martin Weinelt
2026-02-01 17:41:02 +01:00
parent 2af5a88efd
commit f292ede1b7
@@ -1,31 +1,28 @@
{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
pytestCheckHook,
html5lib,
setuptools,
tinycss2,
packaging,
webencodings,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "bleach";
version = "6.3.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-bzuRscCgK7mni1pFTJJQaqD98Zfh1eEU0uAMb2QwbSI=";
src = fetchFromGitHub {
owner = "mozilla";
repo = "bleach";
tag = "v${finalAttrs.version}";
hash = "sha256-a85gLy0Ix4cWvXY0s3m+ZD+ga7en6bYu1iAA22OaSwk=";
};
nativeBuildInputs = [ setuptools ];
build-system = [ setuptools ];
propagatedBuildInputs = [
html5lib
packaging
setuptools
dependencies = [
webencodings
];
@@ -57,8 +54,8 @@ buildPythonPackage rec {
'';
homepage = "https://github.com/mozilla/bleach";
downloadPage = "https://github.com/mozilla/bleach/releases";
changelog = "https://github.com/mozilla/bleach/blob/v${version}/CHANGES";
changelog = "https://github.com/mozilla/bleach/blob/${finalAttrs.src.tag}/CHANGES";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ prikhi ];
};
}
})