Skip to content
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

Partially revert GH-280 #343

Closed
wants to merge 3 commits into from
Closed

Partially revert GH-280 #343

wants to merge 3 commits into from

Conversation

FFY00
Copy link
Member

@FFY00 FFY00 commented Mar 14, 2023

This reverts commits:

Fixes #341

Copy link
Member

@dnicolodi dnicolodi left a comment

Choose a reason for hiding this comment

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

This is the wrong solution to an invalid bug. The meson.build used to demonstrate the bug is invalid. It is not possible to use absolute paths as installation directories in meson.build and have them mapped to wheel paths, either by Meson or by meson-python.

If there is anything to improve is the error message. I thought that it was clear that using absolute installation paths to build wheel was not going to work, and I assumed that any instance of absolute paths in the installation data was a bug in Meson. However, this is not the case.

@@ -400,7 +400,7 @@ def _warn_unsure_platlib(self, origin: pathlib.Path, destination: pathlib.Path)
"""
# {moduledir_shared} is currently handled in heuristics due to a Meson bug,
# but we know that files that go there are supposed to go to platlib.
if self._is_native(origin):
if origin.is_fifo() and self._is_native(origin):
Copy link
Member

Choose a reason for hiding this comment

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

If anything, this should be origin.is_file()

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, sorry, wrong autocomplete.



@pytest.mark.filterwarnings("ignore:::mesonpy")
def test_install_subdir_python_path(wheel_install_subdir_python_path):
Copy link
Member

Choose a reason for hiding this comment

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

You forgot to commit the test package. However, the test would be bogus, see my reply to #341

@FFY00
Copy link
Member Author

FFY00 commented Mar 14, 2023

This is the wrong solution to an invalid bug. The meson.build used to demonstrate the bug is invalid. It is not possible to use absolute paths as installation directories in meson.build and have them mapped to wheel paths, either by Meson or by meson-python.

See my comment in #344 (comment).

I am not gonna budge regarding this, unfortunately. This is something completely reasonable for users to do.

@dnicolodi
Copy link
Member

I am not gonna budge regarding this, unfortunately. This is something completely reasonable for users to do.

Well, for many doing py = import('python').find_installation('python3') is completely reasonable for users to do, but it break horribly when used with meson-python. meson-python should support correct configuration, not what it may look like correct configuration.

@FFY00
Copy link
Member Author

FFY00 commented Mar 14, 2023

Well, for many doing py = import('python').find_installation('python3') is completely reasonable for users to do, but it break horribly when used with meson-python.

That's a limitation of meson-python though, that we cannot fix. Actually, we couldn't we fix it via the native file?

meson-python should support correct configuration, not what it may look like correct configuration.

I mostly agree. Per #344 (comment), I don't think users should be doing this, so I am closing this PR. Thanks for pointing this out!

@FFY00 FFY00 closed this Mar 14, 2023
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.

Unable to map files without a starting placeholder in the Meson metadata (regression)
2 participants