← Back to issue list

spread: fix python-hello

View original Github issue

Metadata

Project
snapcraft
Number
#3670
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

PR #3670 merged into main as d59a4c459, adjusting two python-hello test fixtures to handle setuptools 61.1.0 package discovery and restore the affected spread tests.

Resolution: closed resolved

Reason: PR #3670 was merged into main via commit d59a4c459. Its fixture configuration changes resolved the setuptools 61.1.0 failures in both multiple-python-part spread scenarios.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [X] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [X] Have you successfully run `./runtests.sh static`? - [X] Have you successfully run `./runtests.sh tests/unit`? ----- [`setuptools-61.1.0`](https://setuptools.pypa.io/en/latest/history.html#breaking-changes) broke two spread tests: - `tests/spread/plugins/v2/build-and-run-hello:python_multiple_parts` - `tests/spread/plugins/v2/build-and-run-hello:python_multiple_parts_staged` The following error is produced: ``` Successfully installed pip-22.0.4 setuptools-61.0.0 wheel-0.37.1 + '[' -f setup.py ']' + pip install -U . Processing /root/parts/hello/build Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [14 lines of output] error: Multiple top-level packages discovered in a flat-layout: ['snap', 'empty']. To avoid accidental inclusion of unwanted files or directories, setuptools will not proceed with this build. If you are trying to create a single distribution with multiple packages on purpose, you should not rely on automatic discovery. Instead, consider the following options: 1. set up custom discovery (`find` directive with `include` or `exclude`) 2. use a `src-layout` 3. explicitly set `py_modules` or `packages` with a list of names To find more information, look for "package discovery" on setuptools docs. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details. Failed to build 'hello'. Recommended resolution: Check the build logs and ensure the part's configuration and sources are correct. Run the same command again with --debug to shell into the environment if you wish to introspect this failure. ``` source: https://github.com/pypa/setuptools/pull/2894

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved PR #3670 merged into main as d59a4c459, adjusting two python-hello test fixtures to handle setuptools 61.1.0 package discovery and restore the affected spread tests.
stealth/space-bunny-alpha — closed resolved Merged PR #3670 as d59a4c459 (merge 4fa3a972f), updating python-hello fixtures for setuptools 61.1.0 so two spread tests could run again.
stealth/space-bunny-alpha — closed resolved PR #3670 (d59a4c459) merged into main, updating the python-hello test configuration to handle setuptools 61.1.0's stricter package discovery and restore two spread tests.
qwen/qwen3.6-35b-a3b — — Merged fix for python-hello spread tests broken by setuptools 61.1.0. Updated test configuration to comply with new package discovery rules, resolving metadata generation failures. Approved and passed CI.
qwen3.6-35b-a3b-mtp-q6 — — Merged fix for setuptools 61.1.0 breaking changes causing package discovery failures in python-hello spread tests. Updated test configurations to accommodate new flat-layout restrictions, resolving build metadata generation errors.

Update history

No update history recorded yet.

Related work

  • Caused By: setuptools#2894 (confidence 98%)

    Its stricter automatic package discovery caused the python-hello test failures.

Related issues

Issue Project State Summary Similarity
#3674 spread: fix python-hello snapcraft merged Merged PR #3674 (commit 62d65df) fixed the python-hello spread-test setup for setuptools 61.1.0 package discovery.
94%
#3121 spread tests: improvements for python-hello-with-stage-package-dep snapcraft merged Merged #3121 in commit 440b0ce52, adding appdirs and build-time PYTHONPATH handling to the Python stage-package dependency spread test.
73%
#6171 test(spread): update python tests snapcraft merged Merged PR #6171 in commit 0bd8a7894, aligning core26 spread tests and documentation to use the same ordered set of Python packages.
72%