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

ENH: allow users to pass options directly to Meson #167

Merged
merged 1 commit into from
Nov 16, 2022
Merged

Conversation

FFY00
Copy link
Member

@FFY00 FFY00 commented Oct 7, 2022

Signed-off-by: Filipe Laíns [email protected]

EDIT: closes gh-54

@FFY00 FFY00 force-pushed the meson-options-cli branch 5 times, most recently from 1ade225 to e0379d1 Compare October 7, 2022 04:43
@rgommers rgommers added the enhancement New feature or request label Oct 7, 2022
@FFY00 FFY00 force-pushed the meson-options-cli branch 2 times, most recently from 8b1ffa1 to 8c53be7 Compare November 10, 2022 18:47
@FFY00 FFY00 marked this pull request as ready for review November 10, 2022 18:47
@FFY00 FFY00 force-pushed the meson-options-cli branch 5 times, most recently from e00acce to ff07146 Compare November 10, 2022 20:45
build-backend = 'mesonpy'
requires = ['meson-python']

[tool.mesonpy.args]
Copy link
Member

@dnicolodi dnicolodi Nov 11, 2022

Choose a reason for hiding this comment

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

Does this need to be mesonpy? I think we are settling to meson-python as project name and it is nice to try to be consistent. Actually, we could even think about using tool.meson.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a good point, let's try and update it. We should get rid of mesonpy everywhere except for in the build-backend = 'mesonpy' hook line.

I'd prefer meson-python here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Whops, I missed this comment 😣

@doronbehar
Copy link
Contributor

@FFY00 would it be possible to give an example of how to use --config-settings KEY=VALUE with this PR? I wish to test whether it's possible to compile scipy with --cross-file with this patch..

@FFY00
Copy link
Member Author

FFY00 commented Nov 12, 2022

It should be python -m build -C--cross-file=yourfile.

@doronbehar
Copy link
Contributor

It should be python -m build -C--cross-file=yourfile.

Is -C equivalent to --config-settings? I don't understand what is this build module you refer to with python -m..

@eli-schwartz
Copy link
Member

Is -C equivalent to --config-settings? I don't understand what is this build module you refer to with python -m..

https://github.com/pypa/build

@FFY00 FFY00 merged commit 4bdb1d2 into main Nov 16, 2022
@FFY00 FFY00 deleted the meson-options-cli branch November 16, 2022 16:21
@rgommers rgommers added this to the v0.11.0 milestone Nov 16, 2022
@rgommers
Copy link
Contributor

Great to see this land!

One comment left unaddressed, and let's do a few doc updates in a follow-up PR. @FFY00 are you planning to do that? If not I can do it - already have a need to point people to it:)

@rgommers
Copy link
Contributor

rgommers commented Nov 16, 2022

It should be python -m build -C--cross-file=yourfile.

That seems wrong, I think it should be python -m build -Csetup_args="--cross-file=yourfile". If we want -C--cross-file to work, it looks like it should be special-cased like builddir.

This landed with underscores *_args, which is a little unusual for CLI arguments, so wanted to check that that was intended?

It's nontrivial to figure out the right invocations here, so we need quite a few examples in the docs. Here is another one:

pip install . --config-settings compile_args="-j1"

Another follow-up, unrecognized inputs should raise or give a warning, rather than be silently ignored. This will happily continue a build:

pip install . --config-settings nonsense=true

@rgommers
Copy link
Contributor

This landed with underscores *_args, which is a little unusual for CLI arguments, so wanted to check that that was intended?

This was done in gh-218.

Another follow-up, unrecognized inputs should raise or give a warning, rather than be silently ignored.

This was done in gh-219.

I'll open a new issue for the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Passing through project-specific config options
5 participants