← Back to issue list

python plugin doesn't work with pyproject.toml based projects

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2008237
Type
issue
State
closed
Author
~toabctl
Labels
—
Created
Updated
Closed

Current evaluation

Added core20 support for pyproject.toml projects via #4087 and craft-parts#435; the fix shipped in Snapcraft 8 and restores packaging of console-script entry points.

Resolution: closed resolved

Reason: Snapcraft PR snapcore/snapcraft#4087 added core20 pyproject.toml support in commit 2d596621d and shipped in Snapcraft 8. The underlying implementation landed via canonical/craft-parts#435, commit 438951f7.

Evaluated by: mr-cal-bot

No scores available.

Issue body

python projects move to pyproject.toml instead of using setup.py/setup.cfg . See https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/ . But such a project doesn't correctly build with snapcraft (tested version 7.2.9). The snapcraft call works fine and produces a snap, but the resulting snap isn't correct. Eg. it doesn't contain any console_scripts.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Added core20 support for pyproject.toml projects via #4087 and craft-parts#435; the fix shipped in Snapcraft 8 and restores packaging of console-script entry points.
stealth/space-bunny-alpha — closed resolved Fixed pyproject.toml Python-plugin support in Snapcraft PR #4087 (commit 2d596621d), delivered via craft-parts and released in Snapcraft 8.
stealth/space-bunny-alpha — closed resolved PEP 518/pyproject.toml support for the Python v2 plugin landed via craft-parts PR #435 (commit 438951f7) and snapcraft PR #4087 (commit 2d596621d); shipped on edge and released in snapcraft 8.
stealth/space-bunny-alpha — closed stale Closed as abandoned with no recorded fix or explanation. PR #4087 added Core20 pyproject.toml support, but was not recorded as this report's resolution.
qwen/qwen3.6-35b-a3b — — Abandoned. Closed without comments or resolution, the python plugin's failure to correctly build pyproject.toml projects, specifically missing console_scripts, remains unresolved or was superseded by newer snapcraft versions.
qwen/qwen3.6-35b-a3b — — Closed without resolution due to inactivity. The python plugin fails to build pyproject.toml projects correctly, omitting console_scripts from the resulting snap.
qwen/qwen3.6-35b-a3b — — Closed without resolution, likely abandoned. The python plugin failed to correctly build pyproject.toml projects, resulting in snaps missing console_scripts. No comments or patches were submitted.
qwen3.6-35b-a3b-mtp-q6 — — The python plugin fails to correctly build pyproject.toml-based projects, omitting console_scripts. Closed without resolution or fix, remaining unresolved.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#4087 (confidence 100%)

    Added core20 Python-plugin support for pyproject.toml projects and was released in Snapcraft 8.

  • Likely Fixed By: canonical/craft-parts#435 (confidence 100%)

    Added the underlying Craft Parts support for building pyproject.toml projects.

Related issues

Issue Project State Summary Similarity
#4138 core20: support PEP 518 in the python plugin snapcraft closed core20 python plugin now supports PEP 518 sources with only pyproject.toml and no setup.py, merged in PR #4087 (commit 2d596621d) and shipped in Snapcraft 8; core20 support later removed by #6241.
74%
#435 plugins: add support for pyproject.toml projects (lp:#2008237) craft-parts merged Merged pyproject.toml project support for the Python plugin into main via commit 438951f7; a mistaken 1.19.x backport was reverted.
73%
#344 Support pyprojects.toml for metadata extraction craft-parts closed Python plugin pyproject.toml support merged in canonical/craft-parts#435 (438951f7) and released in 1.20.0; the issue was later closed as already complete.
72%
#4087 python v2 plugin: support building parts conforming to PEP 518 snapcraft merged Merged #4087 as 2d596621d, adding core20 Python v2 plugin support for building PEP 518 projects with pyproject.toml.
71%