Skip to content

Python dependency not found in project without c language on Windows #16024

Description

@dnicolodi
py = import('python').find_installation()
dep = py.dependency()

is unable to find the Python dependency on Windows when the current project does not have the c compiler initialized. This is relevant for projects building extension modules in Rust, for example.

This does not work:

project('foo', 'rust')
py = import('python').find_installation()
dep = py.dependency()

but this does:

project('foo', 'c', 'rust')
py = import('python').find_installation()
dep = py.dependency()

The project is setup with meson setup foo _build --vsenv --native-file=native.txt where native.txt is something like

[binaries]
python = ${path to python.exe}

I haven't check yet what in the python Meson's module requires the C toolchain to detect the Python dependency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmodules:pythonIssues specific to the python module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions