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

[Meson] Meson appending extra machine files #12117

Merged

Conversation

franramirez688
Copy link
Contributor

@franramirez688 franramirez688 commented Sep 14, 2022

Changelog: Feature: Add tools.meson.mesontoolchain:extra_machine_files=["FILENAMES"] to Meson build helper to append machine files to the the ones created by Conan.
Docs: conan-io/docs#2831
Closes: #11961

@@ -8,7 +7,6 @@


@pytest.mark.tool_meson
@pytest.mark.skipif(sys.version_info.major == 2, reason="Meson not supported in Py2")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No python2x anymore

Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

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

I am not convinced that the user story is injecting some meson files to all meson projects, or the users are missing a "local" way to inject those files inside package recipes, but like a different file for each project. I don't know enough about Meson usage and patterns, but we need to think about it.

""")
myfilename = textwrap.dedent("""
[binaries]
c = '/usr/fake/path/gcc'
Copy link
Member

Choose a reason for hiding this comment

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

The definition of compilers might be "standardized" by Conan in its own configuration (or handle env-var CC CXX for everyone), so maybe not a good example

@eli-schwartz
Copy link

From a documentation perspective, what is a meson "user filename"? Shouldn't this use a name more evocative of the fact that Meson calls them native machine files?

@lasote
Copy link
Contributor

lasote commented Sep 15, 2022

From a documentation perspective, what is a meson "user filename"? Shouldn't this use a name more evocative of the fact that Meson calls them native machine files?

But there are native and cross files, right? Maybe something like tools.meson.mesontoolchain:additional_machine_files ?

@czoido czoido modified the milestones: 1.53, 1.54 Oct 4, 2022
@franramirez688 franramirez688 force-pushed the feature/meson_user_filenames branch from 1bb6bb3 to 6036ade Compare October 27, 2022 11:15
@franramirez688 franramirez688 changed the title [Meson] Meson appending user file names [Meson] Meson appending extra machine files Oct 27, 2022
@franramirez688
Copy link
Contributor Author

I am not convinced that the user story is injecting some meson files to all meson projects, or the users are missing a "local" way to inject those files inside package recipes, but like a different file for each project. I don't know enough about Meson usage and patterns, but we need to think about it.

I've changed the configuration name to tools.meson.mesontoolchain:extra_machine_files so I think it's more evident than before. In my opinion, the user story is if you want to add your own variables from any section to the existing Conan ones, so we don't need to add more public attributes to the MesonToolchain class interface to manage all the machine file sections.

@franramirez688
Copy link
Contributor Author

From a documentation perspective, what is a meson "user filename"? Shouldn't this use a name more evocative of the fact that Meson calls them native machine files?

Changed to tools.meson.mesontoolchain:extra_machine_files. I think it's clear enough, doesn't it?

@memsharded memsharded modified the milestones: 1.54, 1.55 Nov 2, 2022
@franramirez688 franramirez688 force-pushed the feature/meson_user_filenames branch from 6036ade to fff6535 Compare November 17, 2022 09:15
@memsharded memsharded merged commit d657cc4 into conan-io:develop Nov 28, 2022
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.

[feature] MesonToolchain custom binaries
5 participants