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

Use more standard form of release flag in MESON_ARGS #112

Merged
merged 4 commits into from
Jul 11, 2024

Conversation

h-vetinari
Copy link
Member

@h-vetinari h-vetinari commented Sep 28, 2023

There are two different ways to set up a release flag to meson, --buildtype release, and -Dbuildtype=release. Apparently the latter is more common; at least it's the recommended way in the docs.

Since meson-python will by default add -Dbuildtype=release, the fact that the compiler-activation does the other kind leads to a duplicate specification and forces us to strip it out again as follows (e.g. in scipy, but affects all feedstocks using meson-python).

# meson-python already sets up a -Dbuildtype=release argument to meson, so
# we need to strip --buildtype out of MESON_ARGS or fail due to redundancy
MESON_ARGS_REDUCED="$(echo $MESON_ARGS | sed 's/--buildtype release //g')"

To avoid this, use the more common form of the flag.

PS. Stumbled over this old PR, where this was discussed with @rgommers
PPS. Sister PR of conda-forge/ctng-compiler-activation-feedstock#98 (now conda-forge/ctng-compiler-activation-feedstock#121)

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Copy link

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for working through the Meson build hiccups @h-vetinari!

@h-vetinari
Copy link
Member Author

h-vetinari commented Jul 11, 2024

@isuruf, it seems meson 1.5.0 (actually already earlier, just didn't see it so far) now deprecated the way we specify pkg-config here

DEPRECATION: "pkgconfig" entry is deprecated and should be replaced by "pkg-config"

so while we're fixing the meson setup in the compiler activation, I'd like to revive this PR.

@isuruf
Copy link
Member

isuruf commented Jul 11, 2024

Let's do this only for new compiler versions and keep the older behaviour for clang 16 and gcc 12.

@h-vetinari
Copy link
Member Author

Let's do this only for new compiler versions and keep the older behaviour for clang 16 and gcc 12.

Good idea! IIUC, you only mean the release flag change here? The pkgconfig fix should be unconditional IMO (as feedstocks will keep pulling in newer meson even on old compilers).

@isuruf
Copy link
Member

isuruf commented Jul 11, 2024

you only mean the release flag change here?

Yes

@h-vetinari h-vetinari merged commit b5df73f into conda-forge:main Jul 11, 2024
20 checks passed
@h-vetinari h-vetinari deleted the meson branch July 11, 2024 07:51
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.

3 participants