-
Notifications
You must be signed in to change notification settings - Fork 69
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
BUG: install_subdir() in meson.build does not honor exlude_files/directories #317
Comments
I think this is a bug in Meson: we should be able to map from source code and build artifacts to installation paths via the |
Considering that, I'd say it's a meson-python bug, Meson just does not provide a way for us to fix it. |
@dnicolodi Sorry if this has been discussed elsewhere, but could you please elaborate in the rationale for avoiding the install step? Is is only about supporting editable installs? Messon favors and out-of-source approach, and if you try to workaround that, at some point some logics will break. This is exactly what happened when I tried to PS: To be fully open and fair, I'm using |
I think you are confusing the build directory and the install prefix in some of your comments. Anyhow, I'll reply trying do disentangle this confusion. The reason for avoiding the install step for editable support has been discussed at length in #279.
As you state above, Meson enforces an out-of-tree approach, therefore copying build artifacts into the source tree is not desirable. More fundamentally, the layout of the source tree does not necessarily need to match the layout of the installed tree, therefore there may not be a place where to copy the build artifacts or a Python package that can be imported.
I'm not trying to work around the split between the source tree and the build tree. What I want is to avoid to have an installed tree in addition to the build and source trees and this is exactly to because I want to avoid to have two set of rules to map files to their location in the Python wheel: one mapping from source directory and build directory to the wheel location via the The problem with the Please note that having support for
I don't find having to list all files that comprise a package that much of a burden. It takes a few minutes to generate the lists when writing the Anyhow, meson-python cannot alter the syntax allowed in Meson projects definitions. Thus it cannot take any pragmatic approach that would relieve you from having to list all source files or using |
I'd also say that seeing it as just a limitation is not quite right. It yields a number of desirable features, like the ability to have multiple parallel builds (e.g., a debug, a release, and a different compiler) in the same repo. When you come from A very similar comment was made on #47 (comment). I think it'd be helpful to add an explanation page on this topic in the docs. WDYT? |
The required introspection data has been added to Meson mesonbuild/meson#11432. I'll add support for |
gh-364 was merged without behavior changes, so reopening. this should be easier to address now though. |
Install files in the right location in case of nested directory structures and implement handling of exclude_directories and exclude_files. Fixes mesonbuild#317.
Install files in the right location in case of nested directory structures and implement handling of exclude_directories and exclude_files. Fixes mesonbuild#317.
Install files in the right location in case of nested directory structures, and implement handling of exclude_directories and exclude_files. The latter requires Meson 1.1.0 or later. Fixes mesonbuild#317.
Install files in the right location in case of nested directory structures, and implement handling of exclude_directories and exclude_files. The latter requires Meson 1.1.0 or later. Fixes mesonbuild#317.
Install files in the right location in case of nested directory structures, and implement handling of exclude_directories and exclude_files. The latter requires Meson 1.1.0 or later. Fixes mesonbuild#317.
I'm trying to use
install_subdir()
to simplify the inclusion of Python source files and other data files in the final wheel. However, theinstall_subdir()
function is not honoring theexlude_files/directories
options.Core Meson is installing things properly and exclusions are honored. However, when
mesonpy
takes over, it ends up copying the subtree from the source directory, and not the install directory as I was expecting. That's the reason the exclusions are not honored: things are being copied from the wrong location. As Meson is all about out-of-tree builds, I would argue this is a bug.The following trivial patch fixes the problem:
However, this patch makes some tests in
tests/test_wheel.py
break.I'm not familiar enough with Meson and meson-python to triage these test failures. Is anyone able to help?
The text was updated successfully, but these errors were encountered: