Skip to content

BUG: correctly handle empty directories when checking package splits - #913

Merged
rgommers merged 3 commits into
mesonbuild:mainfrom
dnicolodi:fix/package-split
Oct 2, 2026
Merged

rgommers merged 3 commits into
mesonbuild:mainfrom
dnicolodi:fix/package-split

Conversation

@dnicolodi

@dnicolodi dnicolodi commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Addresses #869.

@dnicolodi
dnicolodi force-pushed the fix/package-split branch 2 times, most recently from afacb41 to a14cb2e Compare September 29, 2026 07:24
The exclude_files and exclude_dir arguments can make install_subdir()
do not install any files.  Empty directories are not added to the
wheel thus do not contribute to make a package split.  However, the
check for packages split across platlib and purelib was done before
determining whether install_subdir() installed any file, resulting in
false positives.

Move the check after all wheel content has been added to the manifest.
This requires a second iteration over the wheel content, but it can be
avoided in the vast majority of cases where a package installs modules
either only in platlib or in purelib.

Fixes mesonbuild#869.
The test wanted to include Meson 1.1.0 pre-releases, but there was a
typo in the minor version that made it match only 1.2.0 pre-releases
instead.  At this point in time including pre-releases is not relevant
anymore, thus simplify the guard to check only for version 1.1.0 or
later.
@rgommers rgommers added the maintenance Regular code improvements that are not new features nor end-user-visible bugs label Oct 2, 2026
@rgommers rgommers added this to the v0.23.0 milestone Oct 2, 2026

@rgommers rgommers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @dnicolodi

@rgommers
rgommers merged commit 0c3322b into mesonbuild:main Oct 2, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Regular code improvements that are not new features nor end-user-visible bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants