Skip to content

Meson fails to detect Python dependency (Python.h ?) in cibw + windows x86 #2759

@neutrinoceros

Description

@neutrinoceros

I've been trying on-and-off to add win-x86 to my project's wheel matrix
xref: neutrinoceros/gpgi#384

the failed builds ends with the following logs

  -----------
  Run-time dependency numpy found: YES 2.4.2
  Skipping pkgconfig lookup, LIBPC is unset
  Need python for x86_64, but found x86
  Running compile:
  Working directory:  D:\a\gpgi\gpgi\build\meson-private\tmp168a55s7
  Code:
  
          #ifdef __has_include
           #if !__has_include("Python.h")
            #error "Header 'Python.h' could not be found"
           #endif
          #else
           #include <Python.h>
          #endif
  -----------
  Command line: `cl -IC:\Users\runneradmin\AppData\Local\pypa\cibuildwheel\Cache\nuget-cpython\pythonx86.3.11.9\tools\Include D:\a\gpgi\gpgi\build\meson-private\tmp168a55s7\testfile.c /nologo /showIncludes /utf-8 /EP /nologo /showIncludes /utf-8 /EP /Od /Oi-` -> 0
  stderr:
  testfile.c
  -----------
  Run-time dependency python found: NO (tried pkgconfig and sysconfig)

Until recently, it didn't occur to me that the problem could be a bug in cibw, but upon reading v3.4.0's release notes, and in particular seeing the inclusion of #2723, advertised as solving an issue with meson + windows, I wanted to try and see if with any luck, my problem "solved itself" (thanks to @joerick, really). It did not. I'm still seeing this failure with cibw 3.4.0. I note I was initially using build[uv] as my build-frontend. Given that #2723's description explicitly mentions related issues with uv, I also tried build, but it didn't help either.
Any chance someone has an idea where things might derail ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions