Skip to content

Conversation

@olivier-roussel
Copy link
Contributor

@olivier-roussel olivier-roussel commented Jul 21, 2025

#99 broke the CMAKE_ARGS value, as new variable set here causes to invalidate previous set here. Then, the CMAKE_ARGS variable does not contain anymore the CMAKE_INSTALL_PREFIX and so values.
This looks most probably due to the lack of delayed variable expansion in the bat file.

Thanks to @jorisv for the help on this investigation.

Checklist

@conda-forge-admin
Copy link
Contributor

conda-forge-admin commented Jul 21, 2025

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/meta.yaml) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipe/meta.yaml:

  • ℹ️ The recipe is not parsable by parser conda-souschef (grayskull). This parser is not currently used by conda-forge, but may be in the future. We are collecting information to see which recipes are compatible with grayskull.
  • ℹ️ The recipe is not parsable by parser conda-recipe-manager. The recipe can only be automatically migrated to the new v1 format if it is parseable by conda-recipe-manager.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/16418166152. Examine the logs at this URL for more detail.

@h-vetinari
Copy link
Member

Thanks for the PR!

If you want the changes to take effect, you'll very likely need to use !CMAKE_ARGS! instead of %CMAKE_ARGS% in

set "CMAKE_ARGS=-DCMAKE_BUILD_TYPE=Release"
IF "%CONDA_BUILD%" == "1" (
set "CMAKE_ARGS=%CMAKE_ARGS% -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -DCMAKE_PROGRAM_PATH=%BUILD_PREFIX%\bin;%BUILD_PREFIX%\Scripts;%BUILD_PREFIX%\Library\bin;%PREFIX%\bin;%PREFIX%\Scripts;%PREFIX%\Library\bin"
:: see https://github.com/conda-forge/conda-smithy/issues/2319
set "CMAKE_ARGS=%CMAKE_ARGS% -DPython_FIND_REGISTRY=NEVER -DPython3_FIND_REGISTRY=NEVER"
)

as %VAR% is evaluated when the line is first parsed

@olivier-roussel
Copy link
Contributor Author

Indeed, I clearly misunderstood the delayed expansion behavior, thanks for the clarification.
So, if I understood now correctly, just delaying the call on this line shoud be enough:

set "CMAKE_ARGS=%CMAKE_ARGS% -DPython_FIND_REGISTRY=NEVER -DPython3_FIND_REGISTRY=NEVER"

@olivier-roussel olivier-roussel marked this pull request as ready for review July 21, 2025 13:26
@h-vetinari
Copy link
Member

So, if I understood now correctly, just delaying the call on this line shoud be enough:

I would have just put it on both lines, but this should be fine.

@h-vetinari h-vetinari merged commit 831f9fe into conda-forge:main Jul 21, 2025
13 checks passed
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