-
Notifications
You must be signed in to change notification settings - Fork 1k
Pep632 support meson build #6326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
blackboxsw
merged 8 commits into
canonical:main
from
blackboxsw:pep517-support-meson-build
Aug 23, 2025
Merged
Pep632 support meson build #6326
blackboxsw
merged 8 commits into
canonical:main
from
blackboxsw:pep517-support-meson-build
Aug 23, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0892b62 to
396745f
Compare
f0cd2e5 to
6dc97e4
Compare
holmanb
reviewed
Jul 25, 2025
Member
holmanb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass. Thanks for your work on this @blackboxsw!
706fa63 to
f61e0e0
Compare
holmanb
reviewed
Jul 25, 2025
holmanb
reviewed
Jul 29, 2025
holmanb
reviewed
Jul 30, 2025
holmanb
reviewed
Jul 30, 2025
holmanb
reviewed
Jul 30, 2025
holmanb
reviewed
Jul 31, 2025
f61e0e0 to
7c7717c
Compare
holmanb
reviewed
Aug 1, 2025
holmanb
reviewed
Aug 1, 2025
6c423f5 to
2fbaac2
Compare
holmanb
reviewed
Aug 1, 2025
69dc688 to
5880155
Compare
tools/read-dependencies DISTRO_PKG_MAP values are only one of ubuntu, redhat, suse or fedora. Simplify value check when adding rpm-build package dependency.
Migrate package testing build info into existing testing page.
71cc5cf to
4fd31ec
Compare
blackboxsw
added a commit
that referenced
this pull request
Aug 23, 2025
setuptools deprecated use of data_files for non-package external data files or system files for some time[1],[2] as part of PEP632[3] work. This PEP632 incompatiblity prompts some distributions to drop support for cloud-init in their operating system[4]. Rather than pursue the use of setup.py via setuptools further, shift to meson which better supports downstream operating system-level packaging of ancillary distribution of man pages, config files, udev, openrc or systemd scripts which are intended to live outside of a pure python distribution. Since cloudinit package is primarily intended to be delivered as system library and utility for initial system setup during first boot, it is out of the scope of cloud-init to support local wheel or bdist installations via pypi in custom locations outside of system packages as we want only one system-package installation of cloud-init in any environment. As such, cloud-init's use of python setuptools is not necessary. A move to meson gives a bit more flexibility to handle parameterized delivery of the supplemental config, init scripts, man pages an tooling which can be extended for cross-platform build support. This commit creates an initial draft of the work to migrate cloud-init backend to use meson >= 0.63.0. - Drop setup.py and replace that functionality with meson.build files which perform the same setup, template rendering and installs previously done by setuptools. - drop build-system backend from pyproject.toml to avoid automatic RTD meson-builds - Add test targets and dependency install targets to meson.build - Set pyproject.toml to use meson build backend - Drop now unused setup_utils and moving pep400 func to test_tools.py - update dev testing tools under packages to provide reference SPEC and debian/* files and allow for local development package builds References: - [1] https://setuptools.pypa.io/en/latest/references/keywords.html - [2] https://setuptools.pypa.io/en/latest/userguide/datafiles.html#non-package-data-files - [3] https://peps.python.org/pep-0632/ Closes: GH-3986 Fixes: GH-5027 LP: #1978328
blackboxsw
added a commit
that referenced
this pull request
Aug 23, 2025
blackboxsw
added a commit
that referenced
this pull request
Aug 23, 2025
blackboxsw
added a commit
that referenced
this pull request
Aug 23, 2025
- tests/unittests/config/test_schema.py::TestModuleDocs and TestCloudConfigExamples - tests/unittests/test_merging.py
blackboxsw
added a commit
that referenced
this pull request
Aug 23, 2025
blackboxsw
added a commit
that referenced
this pull request
Aug 23, 2025
tools/read-dependencies DISTRO_PKG_MAP values are only one of ubuntu, redhat, suse or fedora. Simplify value check when adding rpm-build package dependency.
blackboxsw
added a commit
that referenced
this pull request
Aug 23, 2025
Migrate package testing build info into existing testing page.
DarkPhily
pushed a commit
to hetznercloud/cloud-init
that referenced
this pull request
Sep 2, 2025
setuptools deprecated use of data_files for non-package external data files or system files for some time[1],[2] as part of PEP632[3] work. This PEP632 incompatiblity prompts some distributions to drop support for cloud-init in their operating system[4]. Rather than pursue the use of setup.py via setuptools further, shift to meson which better supports downstream operating system-level packaging of ancillary distribution of man pages, config files, udev, openrc or systemd scripts which are intended to live outside of a pure python distribution. Since cloudinit package is primarily intended to be delivered as system library and utility for initial system setup during first boot, it is out of the scope of cloud-init to support local wheel or bdist installations via pypi in custom locations outside of system packages as we want only one system-package installation of cloud-init in any environment. As such, cloud-init's use of python setuptools is not necessary. A move to meson gives a bit more flexibility to handle parameterized delivery of the supplemental config, init scripts, man pages an tooling which can be extended for cross-platform build support. This commit creates an initial draft of the work to migrate cloud-init backend to use meson >= 0.63.0. - Drop setup.py and replace that functionality with meson.build files which perform the same setup, template rendering and installs previously done by setuptools. - drop build-system backend from pyproject.toml to avoid automatic RTD meson-builds - Add test targets and dependency install targets to meson.build - Set pyproject.toml to use meson build backend - Drop now unused setup_utils and moving pep400 func to test_tools.py - update dev testing tools under packages to provide reference SPEC and debian/* files and allow for local development package builds References: - [1] https://setuptools.pypa.io/en/latest/references/keywords.html - [2] https://setuptools.pypa.io/en/latest/userguide/datafiles.html#non-package-data-files - [3] https://peps.python.org/pep-0632/ Closes: canonicalGH-3986 Fixes: canonicalGH-5027 LP: #1978328
DarkPhily
pushed a commit
to hetznercloud/cloud-init
that referenced
this pull request
Sep 2, 2025
DarkPhily
pushed a commit
to hetznercloud/cloud-init
that referenced
this pull request
Sep 2, 2025
DarkPhily
pushed a commit
to hetznercloud/cloud-init
that referenced
this pull request
Sep 2, 2025
DarkPhily
pushed a commit
to hetznercloud/cloud-init
that referenced
this pull request
Sep 2, 2025
tools/read-dependencies DISTRO_PKG_MAP values are only one of ubuntu, redhat, suse or fedora. Simplify value check when adding rpm-build package dependency.
DarkPhily
pushed a commit
to hetznercloud/cloud-init
that referenced
this pull request
Sep 2, 2025
Migrate package testing build info into existing testing page.
DarkPhily
pushed a commit
to hetznercloud/cloud-init
that referenced
this pull request
Sep 2, 2025
blackboxsw
added a commit
to blackboxsw/cloud-init
that referenced
this pull request
Sep 3, 2025
setuptools deprecated use of data_files for non-package external data files or system files for some time[1],[2] as part of PEP632[3] work. This PEP632 incompatiblity prompts some distributions to drop support for cloud-init in their operating system[4]. Rather than pursue the use of setup.py via setuptools further, shift to meson which better supports downstream operating system-level packaging of ancillary distribution of man pages, config files, udev, openrc or systemd scripts which are intended to live outside of a pure python distribution. Since cloudinit package is primarily intended to be delivered as system library and utility for initial system setup during first boot, it is out of the scope of cloud-init to support local wheel or bdist installations via pypi in custom locations outside of system packages as we want only one system-package installation of cloud-init in any environment. As such, cloud-init's use of python setuptools is not necessary. A move to meson gives a bit more flexibility to handle parameterized delivery of the supplemental config, init scripts, man pages an tooling which can be extended for cross-platform build support. This commit creates an initial draft of the work to migrate cloud-init backend to use meson >= 0.63.0. - Drop setup.py and replace that functionality with meson.build files which perform the same setup, template rendering and installs previously done by setuptools. - drop build-system backend from pyproject.toml to avoid automatic RTD meson-builds - Add test targets and dependency install targets to meson.build - Set pyproject.toml to use meson build backend - Drop now unused setup_utils and moving pep400 func to test_tools.py - update dev testing tools under packages to provide reference SPEC and debian/* files and allow for local development package builds References: - [1] https://setuptools.pypa.io/en/latest/references/keywords.html - [2] https://setuptools.pypa.io/en/latest/userguide/datafiles.html#non-package-data-files - [3] https://peps.python.org/pep-0632/ Closes: canonicalGH-3986 Fixes: canonicalGH-5027 LP: #1978328
blackboxsw
added a commit
to blackboxsw/cloud-init
that referenced
this pull request
Sep 3, 2025
blackboxsw
added a commit
to blackboxsw/cloud-init
that referenced
this pull request
Sep 3, 2025
blackboxsw
added a commit
to blackboxsw/cloud-init
that referenced
this pull request
Sep 3, 2025
blackboxsw
added a commit
to blackboxsw/cloud-init
that referenced
this pull request
Sep 3, 2025
tools/read-dependencies DISTRO_PKG_MAP values are only one of ubuntu, redhat, suse or fedora. Simplify value check when adding rpm-build package dependency.
blackboxsw
added a commit
to blackboxsw/cloud-init
that referenced
this pull request
Sep 3, 2025
Migrate package testing build info into existing testing page.
blackboxsw
added a commit
to blackboxsw/cloud-init
that referenced
this pull request
Sep 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
documentation
This Pull Request changes documentation
packaging
Supplemental package review requested
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
chore!: switch to meson.build due to PEP632 setuptools data_files depr
setuptools has deprecated use of data_files for external files and man pages for some time[1],[2] as part of PEP632[3] work.
This PEP632 incompatiblity prompts some distributions to drop support for cloud-init in their operating system[4].
Rather than continue to patch our dated use of setup.py via setuptools further, shift to meson which better supports downstream operating system distribution packaging of ancillary distribution of man pages, config files, udev, openrc or systemd scripts which are intended to live outside of a pure python distribution.
Since cloudinit package is primarily intended to be delivered as core library and utility for system setup during first boot of a system, it is out of the scope of cloud-init to support local wheel or bdist installations via pypi in custom local locations outside of system packages as we want only one system-package level installation of cloud-init in any environment.
As such, cloud-init's use of python setuptools is not necessary to package or deliver python via standard system packages, so a move to meson gives a bit more flexibility to handle delivery of the supplemental config, init scripts, man pages and tooling in one place.
This commit creates an initial draft of the work to move cloud-init build tooling from setuptools to meson.
It drops setup.py and replaces that functionality with a number of meson.build files to perform the same setup, template rendering and installs previously done by setuptools. It sets pyproject.toml to use meson build backend and supports deb building only at the moment.
What remains for this commit before moving forward
References:
Fixes: GH-5027
Closes: GH-3986
LP: #1978328
Extra context:
paired with downstream ubuntu/devel branch #6394 once this lands
Test procedure