charmcraft 2.5.2 on PyPi doesn't install on jammy/py310 (at least) - error "ModuleNotFoundError: No module named 'tools'"
Metadata
Current evaluation
Charmcraft 2.5.2 omitted the tools package from its build. The defect was fixed in Charmcraft 3.0, but the requested 2.x backport was never implemented.
Resolution: closed stale
Reason: Maintainer @lengau confirmed the packaging fix shipped in Charmcraft 3.0. Although the reporter requested a 2.x backport, no backport PR or commit followed before the discussion became inactive.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
A tox env with charmcraft >= 2.5.0 fails to install with charmcraft:
```
Collecting charmcraft<3.0 (from -r /home/alex/Projects/Canonical/git/github.com/openstack-charmers/charmhub-lp-tools/requirements.txt (line 16))
Using cached charmcraft-2.5.2.tar.gz (185 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
Traceback (most recent call last):
File "/home/alex/Projects/Canonical/git/github.com/openstack-charmers/charmhub-lp-tools/.tox/py3/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/alex/Projects/Canonical/git/github.com/openstack-charmers/charmhub-lp-tools/.tox/py3/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/alex/Projects/Canonical/git/github.com/openstack-charmers/charmhub-lp-tools/.tox/py3/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-8bdjwu91/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-8bdjwu91/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-8bdjwu91/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 480, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-8bdjwu91/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 23, in <module>
ModuleNotFoundError: No module named 'tools'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
```
### To Reproduce
Create a virtualenv.
```bash
virtualenv -p `which python3` venv
. venv/bin/activate
pip install charmcraft
```
### Environment
Ubuntu Jammy (22.04)
```
$ python --version
Python 3.10.12
```
### charmcraft.yaml
```shell
N/A
```
### Relevant log output
```shell
alex@alex-x570: ~/tmp/tempvenv ❯ virtualenv -p `which python3` venv
created virtual environment CPython3.10.12.final.0-64 in 126ms
creator CPython3Posix(dest=/home/alex/tmp/tempvenv/venv, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/alex/.local/share/virtualenv)
added seed packages: pip==23.2, setuptools==68.0.0, wheel==0.40.0
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
alex@alex-x570: ~/tmp/tempvenv ❯ . venv/bin/activate
alex@alex-x570: ~/tmp/tempvenv 🐍 (venv)❯ pip install charmcraft
Collecting charmcraft
Using cached charmcraft-2.5.2.tar.gz (185 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
Traceback (most recent call last):
File "/home/alex/tmp/tempvenv/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/alex/tmp/tempvenv/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/alex/tmp/tempvenv/venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-75mqadoz/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-75mqadoz/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-75mqadoz/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 480, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-75mqadoz/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 23, in <module>
ModuleNotFoundError: No module named 'tools'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
```
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed stale | Charmcraft 2.5.2 omitted the tools package from its build. The defect was fixed in Charmcraft 3.0, but the requested 2.x backport was never implemented. | |
| stealth/space-bunny-alpha | — | closed resolved | The 2.x sdist omitted the required tools module; installation was fixed in Charmcraft 3.0. No 2.x backport was implemented. | |
| stealth/space-bunny-alpha | — | closed superseded | Packaging omitted the tools module, breaking PyPI installation on Python 3.10. Fixed in Charmcraft 3.0; a 2.x backport was requested but not implemented. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Packaging error in charmcraft 2.5.2 caused install failures due to the missing tools module. The bug was fixed in Charmcraft 3.0. A backport to the 2.x branch was requested but not implemented. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed in Charmcraft 3.0. A packaging error in 2.5.2 excluded the tools module, causing build failures. Backporting to 2.x was requested but not implemented. | |
| qwen/qwen3.6-35b-a3b | — | — | Packaging error in charmcraft 2.5.2 caused installation failures due to a missing tools module. The issue was resolved in Charmcraft 3.0. Backporting to the 2.x branch was requested but not confirmed. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Packaging error in charmcraft 2.5.2 omitted the tools module, causing installation failures. The bug was fixed in Charmcraft 3.0. Backporting to 2.x was discussed but not pursued, and the issue was closed. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.