python3Packages.xmlsec: cleanup, skip failing test on x86_64-darwin (#503195)

This commit is contained in:
Nick Cao
2026-03-25 22:35:23 +00:00
committed by GitHub
@@ -1,27 +1,41 @@
{
lib,
stdenv,
buildPythonPackage,
fetchPypi,
hypothesis,
fetchFromGitHub,
# build-system
pkgconfig,
setuptools-scm,
# nativeBuildInputs
pkg-config,
# pkgconfig,
# buildInputs
libtool,
libxml2,
libxslt,
lxml,
pkg-config,
pkgconfig,
pytestCheckHook,
setuptools-scm,
xmlsec,
# dependencies
lxml,
# tests
hypothesis,
pytestCheckHook,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "xmlsec";
version = "1.3.17";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-8/rJrmefZlhZJcwAxfaDmuNsHQMVdhlXHe4YrMBbnAE=";
src = fetchFromGitHub {
owner = "xmlsec";
repo = "python-xmlsec";
tag = finalAttrs.version;
hash = "sha256-p3V75DLUI2PKdharP3/0HrKOgma9Kh3lAOZLRAQjo80=";
};
postPatch = ''
@@ -29,25 +43,27 @@ buildPythonPackage rec {
--replace-fail "setuptools==" "setuptools>="
'';
build-system = [ setuptools-scm ];
build-system = [
pkgconfig
setuptools-scm
];
nativeBuildInputs = [
pkg-config
pkgconfig
];
buildInputs = [
xmlsec
libxslt
libxml2
libtool
libxml2
libxslt
xmlsec
];
propagatedBuildInputs = [ lxml ];
dependencies = [ lxml ];
nativeCheckInputs = [
pytestCheckHook
hypothesis
pytestCheckHook
];
disabledTestPaths = [
@@ -55,13 +71,18 @@ buildPythonPackage rec {
"tests/test_doc_examples.py"
];
disabledTests = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
# AssertionError: memory leak detected
"test_reinitialize_module"
];
pythonImportsCheck = [ "xmlsec" ];
meta = {
description = "Python bindings for the XML Security Library";
homepage = "https://github.com/mehcode/python-xmlsec";
changelog = "https://github.com/xmlsec/python-xmlsec/releases/tag/${version}";
homepage = "https://github.com/xmlsec/python-xmlsec";
changelog = "https://github.com/xmlsec/python-xmlsec/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ zhaofengli ];
};
}
})