Conversation
| wheel_files[path].append(_Entry(dst, src, install_rpath, build_rpath)) | ||
|
|
||
| packages: Dict[str, Tuple[str, pathlib.Path]] = {} | ||
| for path in ('purelib', 'platlib'): |
There was a problem hiding this comment.
Why does the check need to be repeated for both purelib and platlib?
|
|
||
| @pytest.mark.skipif(MESON_VERSION < (1, 2, 0), reason='meson too old to report excluded files') | ||
| @pytest.mark.parametrize('empty_first', [True, False]) | ||
| def test_purelib_platlib_empty_subdir(tmp_path, empty_first): |
There was a problem hiding this comment.
The way this test is structured makes it hard to read. Just add the relevant parts to the tests/packages/purelib-platlib-split test package.
There was a problem hiding this comment.
Sorry, this is not a good idea: purelib-platlib-split raises an error, thus checking for a valid setup in it makes writing the test awkward. tests/packages/install-subdir is the place where this should go.
|
I do not understand the last changes pushed to the PR. Empty directories are not added to wheel, and even if they were, they would not cause a package to be split between |
Meson lists install_sources() entries before install_subdir() entries. Use install_subdir() for platlib so the empty purelib entry is visited first and the test reproduces the StopIteration reported in #869. Run the regression from Meson 1.1, which already reports exclusions.
|
Was this closed by mistake? |
An
install_subdir()entry with all files excluded can causeStopIterationin the split-package check. Check the expanded wheel entries so empty directories are ignored and actual splits still raiseBuildError.Fixes #869.
python -m pytest tests/test_wheel.py: 26 passed, 12 skipped on Windows.