Skip to content

Use more standard form of release flag in MESON_ARGS#112

Merged
h-vetinari merged 4 commits into
conda-forge:mainfrom
h-vetinari:meson
Jul 11, 2024
Merged

Use more standard form of release flag in MESON_ARGS#112
h-vetinari merged 4 commits into
conda-forge:mainfrom
h-vetinari:meson

Conversation

@h-vetinari

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

Copy link
Copy Markdown
Member

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
Copy Markdown

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.

@rgommers rgommers left a comment

Copy link
Copy Markdown

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

h-vetinari commented Jul 11, 2024

Copy link
Copy Markdown
Member Author

@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

isuruf commented Jul 11, 2024

Copy link
Copy Markdown
Member

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

@h-vetinari

Copy link
Copy Markdown
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

isuruf commented Jul 11, 2024

Copy link
Copy Markdown
Member

you only mean the release flag change here?

Yes

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