[Bug 2119562] Re: Pybuild fails to install submodules
Launchpad Bug Tracker
2119562 at bugs.launchpad.net
Fri Aug 22 02:28:19 UTC 2025
This bug was fixed in the package python-openstackclient -
8.1.0+git2025070715.9d3a956a-0ubuntu2
---------------
python-openstackclient (8.1.0+git2025070715.9d3a956a-0ubuntu2) questing; urgency=medium
* d/p/fix-pyproject-auto-discovery.patch: Add patch to discover submodules at
build time (ie, openstackclient-common, etc.). (LP: #2119562)
* d/control: Add pybuild-plugin-pyproject to Build-Depends.
-- Myles Penner <myles.penner at canonical.com> Tue, 05 Aug 2025 09:47:42
-0700
** Changed in: python-openstackclient (Ubuntu)
Status: New => Fix Released
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-openstackclient in Ubuntu.
https://bugs.launchpad.net/bugs/2119562
Title:
Pybuild fails to install submodules
Status in python-openstackclient package in Ubuntu:
Fix Released
Bug description:
There was a recent change in upstream python-openstackclient[1] that
migrated setup configuration to pyproject.toml. Packaging a git
snapshot of upstream for OpenStack Flamingo with this change gives the
following error during autopkgtests:
86s Traceback (most recent call last):
86s File "/usr/bin/openstack", line 6, in <module>
86s from openstackclient.shell import main
86s File "/usr/lib/python3/dist-packages/openstackclient/shell.py", line 27, in <module>
86s from openstackclient.common import clientmanager
86s ModuleNotFoundError: No module named 'openstackclient.common'
On inspection with dpkg-deb --contents, all subdirectories of
openstackclient are missing (api, common, compute, identity, image,
locale, network, object, releasenotes, tests, volume).
A workaround I have found is patching the pyproject.toml file to
replace this stanza:
[tool.setuptools]
packages = [
"openstackclient"
]
With this stanza to recursively look for subdirectories as described
in the docs[2]:
[tool.setuptools.packages.find]
include = ["openstackclient*"]
exclude = ["openstackclient.tests*"]
When building the package with pip in a venv (ie, pip install
'git+https://opendev.org/openstack/python-
openstackclient.git at master'), this issue is not present. This suggests
it is either an issue with pybuild or our packaging process.
[1] https://opendev.org/openstack/python-openstackclient/commit/1b4fe6fac10cabfc54c990e19530f7fc10b93377
[2] https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-openstackclient/+bug/2119562/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list