Skip to content

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

Open
dnicolodi wants to merge 3 commits into
mesonbuild:mainfrom
dnicolodi:fix/package-split
Open

dnicolodi wants to merge 3 commits into
mesonbuild:mainfrom
dnicolodi:fix/package-split

Conversation

@dnicolodi

Copy link
Copy Markdown
Member

No description provided.

@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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant