← Back to issue list

[REGRESSION] charmcraft not installing dependencies from requirements.txt anymore

View original Github issue

Metadata

Project
charmcraft
Number
#470
Type
issue
State
closed
Author
heitorPB
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged PR #472 (commit 57b74577, "build: include venv in prime if charm-requirements defined"), which restored requirements.txt deps appearing in packed charms; maintainer closed after release in edge.

Resolution: closed resolved

Reason: PR #472 was merged into master (merge commit 6f167533) and its commit 57b74577 primes the charm venv when charm-requirements are set, so requirements are installed again. facundobatista closed the issue noting the fix was already released in edge, and the reporter confirmed it works.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Hello, Today I `charmcraft pack -p charm-slurmd` and the final charm does not have the requirements installed: ```bash $ charmcraft pack --project-dir charm-slurmd Packing charm 'slurmd_ubuntu-20.04-amd64_centos-7-amd64.charm'... Created 'slurmd_ubuntu-20.04-amd64_centos-7-amd64.charm'. $ unzip -l slurmd_ubuntu-20.04-amd64_centos-7-amd64.charm Archive: slurmd_ubuntu-20.04-amd64_centos-7-amd64.charm Length Date Time Name --------- ---------- ----- ---- 319 2021-07-29 17:17 manifest.yaml 1221 2021-04-19 18:51 dispatch 619 2021-07-15 18:21 metadata.yaml 1764 2021-06-14 12:29 actions.yaml 899 2021-06-14 12:29 config.yaml 18 2021-07-29 17:14 version 1221 2021-04-19 18:51 hooks/upgrade-charm 1221 2021-04-19 18:51 hooks/start 1221 2021-04-19 18:51 hooks/install 14563 2021-07-15 18:21 src/charm.py 2689 2021-06-24 19:14 src/utils.py 1223 2021-07-15 18:21 src/interface_slurmd_peer.py 6646 2021-07-15 18:21 src/interface_slurmd.py --------- ------- 33624 13 files ``` The `requirements.txt` is in folder `charm-slurmd/requirements.txt`. Charmcraft version: 1.1.0+149.gd829b3f from latest/edge

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #472 (commit 57b74577, "build: include venv in prime if charm-requirements defined"), which restored requirements.txt deps appearing in packed charms; maintainer closed after release in edge.
stealth/space-bunny-alpha — closed resolved Fixed in merged PR #472 (57b74577), which primes the charm venv when charm-requirements are defined, restoring dependencies from requirements.txt in packed charms.
qwen3.6-35b-a3b-mtp-q6 — — A regression in charmcraft failed to package dependencies from requirements.txt. The fix was merged and released in the edge channel, resolving the issue. Verified by the reporter.
qwen/qwen3.6-35b-a3b — — A regression in charmcraft 1.1.0 prevented packaging dependencies from requirements.txt. The fix was implemented and released in the edge channel. The reporter confirmed the update resolves the issue, with dependencies now correctly included in the built charm.
qwen/qwen3.6-35b-a3b — — Charmcraft regression where requirements.txt dependencies were excluded from packaged charms. The fix was landed and released in the edge channel. The reporter confirmed the virtual environment is now correctly included.
qwen3.6-35b-a3b-mtp-q6 — — Charmcraft regression excluded requirements.txt dependencies from packaged charms. The fix was released in the edge channel. The author verified the resolution after upgrading to latest/candidate, and the issue is closed.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/charmcraft#472 (confidence 95%)

    PR 'fix-charm-venv-presence' merged as 57b74577, including venv in prime when charm-requirements defined

  • Related To: canonical/charmcraft#463 (confidence 30%)

    Same era charm venv/requirements handling changes in charmcraft 1.x packaging

Related issues

Issue Project State Summary Similarity
#1389 'charm-strict-dependencies' requires at least one requirements file. in field 'parts.charm.charm-strict-dependencies' charmcraft closed Merged #1808 (0d3b2713) to remove early requirements-file existence checks, although the reporter said explicitly listed files still failed in Charmcraft 2.7.3.
74%
#1456 Strict dependencies prevents charm from building charmcraft closed Fixed in PR #1716 (commit def89c50): Charmcraft raised its minimum pip version so strict-dependency builds upgrade old virtual environments first.
72%
#303 snap: explicitly use requirements.txt for dependencies charmcraft merged Merged PR #303 made the Charmcraft snap explicitly install dependencies from requirements.txt, via commit 17741dc7 and merge commit 83fbd200.
70%
#1664 `charm-python-packages` does not guarantee these packages are installed before packages in `requirements.txt` charmcraft closed Fixed in Charmcraft 3.2 by merged PR #1727 (commit 51a55f73), which installs charm-python-packages before requirements and charm libraries.
70%
#1058 Packages in `requirements.txt` not updated without `charmcraft clean` charmcraft closed Closed without a code fix: the legacy charm plugin continued caching by requirements.txt, leaving local-package changes unresolved; newer Python/Poetry plugins were suggested instead.
70%