← Back to issue list

Include a PYDEPS key in the charm library specification

View original Github issue

Metadata

Project
charmcraft
Number
#929
Type
issue
State
closed
Author
facundobatista
Labels
—
Created
Updated
Closed

Current evaluation

PYDEPS support was implemented and merged in canonical/charmcraft#1003 (implementation 193776ae, merge 8a3a0e6f), adding included charm-library dependencies during packing.

Resolution: closed resolved

Reason: PR #1003 was merged as 8a3a0e6f. Its implementation commit 193776ae added library PYDEPS parsing and incorporated those dependencies into the charm's packed environment.

Evaluated by: mr-cal-bot

No scores available.

Issue body

`PYDEPS` will be a list of strings, each string is a Python dependency specification. E.g, `PYDEPS = ["jinja2", "requests > 2.1"]` When packing, Charmcraft will extend all the declared dependencies in `charmcraft.yaml` with all the dependencies specified in all the included libraries, so the different libraries will have the needed dependencies installed when imported from the charm. Note that Charmcraft will not do any conflict resolution or analysis, it's all up to `pip` at the moment of the virtualenv setup that is exercised when packing.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved PYDEPS support was implemented and merged in canonical/charmcraft#1003 (implementation 193776ae, merge 8a3a0e6f), adding included charm-library dependencies during packing.
stealth/space-bunny-alpha — closed resolved PYDEPS support was implemented and merged in #1003 (commit 193776ae), adding Python dependencies from included charm libraries when packing.
qwen3.6-35b-a3b-mtp-q6 — — Proposal to add a PYDEPS key for library dependencies in charmcraft was closed and abandoned. No implementation occurred, leaving dependency resolution to pip during packaging.
qwen/qwen3.6-35b-a3b — — Closed without implementation. The PYDEPS key proposal for charmcraft libraries was abandoned. It would have extended charmcraft.yaml dependencies with library specs during packing, deferring resolution to pip.
qwen3.6-35b-a3b-mtp-q6 — — Proposal to add a PYDEPS key for charm library dependencies was closed without implementation or discussion. The feature was abandoned.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/charmcraft#1003 (confidence 100%)

    Merged implementation for including dependencies declared by charm libraries.

Related issues

Issue Project State Summary Similarity
#1890 PYDEPS linter charmcraft closed Implemented the PYDEPS linter in charmcraft PR #2250 (commit 8877d1b1), checking that dependencies required by included charm libraries are installed in the venv.
76%
#1003 pack: include the charm libraries dependencies (CRAFT-1559) charmcraft merged Merged #1003 in commit 8a3a0e6f, adding charm-library PYDEPS to venv priming and dependency handling while improving library-tree parsing.
75%