meson icon indicating copy to clipboard operation
meson copied to clipboard

Defer evaluating ModuleState.project_version

Open QuLogic opened this issue 1 year ago • 2 comments

This property is only used in pkgconfig.generate, and external_project.dependency, not elsewhere. By avoiding this evaluation, it fixes an exception if using import in the version argument of project.

Fixes #5134

I'm not sure if this should go in a test or not; do we want to codify the example from #5134 as an intended way to do things?

QuLogic avatar May 27 '24 21:05 QuLogic

I'm actually unsure we want to support this use case. Modules aren't really a good fit for something meaningful to return a string version number.

eli-schwartz avatar May 27 '24 21:05 eli-schwartz

The main reason for trying to fix this is that find_program('python3') finds the wrong Python. It seems to try import('python').find_installation() as a last resort, which seemingly doesn't work everywhere. I no longer remember where though, but it's likely Windows with its weirdo python3-is-a-store antics.

QuLogic avatar Sep 09 '24 06:09 QuLogic