From a3ac5fcc7e0168afef21e461af9b30e5bcbf899b Mon Sep 17 00:00:00 2001 From: Dom Rodriguez Date: Fri, 18 Sep 2026 22:46:21 +0100 Subject: [PATCH] buildstream: install sample-plugins fixture for pip mirror test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test_source_mirror_plugin[pip] loads a source-mirror plugin via a `pip` origin, which resolves the plugin package through importlib.metadata. Build the `sample-plugins` test fixture package (shipped in buildstream's own tests/plugins/sample-plugins) and add it to nativeCheckInputs so its entry-point metadata is visible. Note: pyproject = true; build-system = [ setuptools ]; is required here even though the fixture only has a setup.py — setuptools synthesizes the PEP 517 backend for legacy projects. pyproject = false without a Makefile silently no-ops the build and install phases, producing an empty package. Assisted-by: Claude Code (claude-sonnet-5) (cherry picked from commit 559968897f162beef3f61776d97bdace8b65b3c2) --- pkgs/by-name/bu/buildstream/package.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/bu/buildstream/package.nix b/pkgs/by-name/bu/buildstream/package.nix index fe78cdc75321..e079326e77b1 100644 --- a/pkgs/by-name/bu/buildstream/package.nix +++ b/pkgs/by-name/bu/buildstream/package.nix @@ -94,12 +94,20 @@ python3Packages.buildPythonApplication (finalAttrs: { python3Packages.pytest-xdist python3Packages.pytestCheckHook versionCheckHook + + # Test fixture plugin package used by test_source_mirror_plugin[pip]; upstream + # normally installs this via tox before running the pip-origin plugin loading test. + (python3Packages.buildPythonPackage { + pname = "sample-plugins"; + version = "1.2.3"; + pyproject = true; + build-system = [ python3Packages.setuptools ]; + src = "${finalAttrs.src}/tests/plugins/sample-plugins"; + dontCheck = true; + }) ]; disabledTests = [ - # Error loading project: project.conf [line 37 column 2]: Failed to load source-mirror plugin 'mirror': No package metadata was found for sample-plugins - "test_source_mirror_plugin" - # Runtime error: The FUSE stager child process unexpectedly died with exit code 2 "test_patch_sources_cached_1" "test_patch_sources_cached_2"