Closed fujiisoup closed 1 year ago
It is still failing, saying
+ python -m pip wheel 'D:\a\py3nj\py3nj' '--wheel-dir=C:\Users\runneradmin\AppData\Local\Temp\cibw-run-2eznju6f\cp38-win32\built_wheel' --no-deps
Processing d:\a\py3nj\py3nj
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
+ meson setup D:\a\py3nj\py3nj D:\a\py3nj\py3nj\.mesonpy-p5usx21z\build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=D:\a\py3nj\py3nj\.mesonpy-p5usx21z\build\meson-python-native-file.ini
The Meson build system
Version: 1.2.1
Source dir: D:\a\py3nj\py3nj
Build dir: D:\a\py3nj\py3nj\.mesonpy-p5usx21z\build
Build type: native build
Project name: py3nj
Project version: 0.2.2
..\..\meson.build:1:0: ERROR: Executables created by fortran compiler gfortran are not runnable.
A full log can be found at D:\a\py3nj\py3nj\.mesonpy-p5usx21z\build\meson-logs\meson-log.txt
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Error: Command ['python', '-m', 'pip', 'wheel', 'D:\\a\\py3nj\\py3nj', '--wheel-dir=C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-2eznju6f\\cp38-win32\\built_wheel', '--no-deps'] failed with code 1. None
Looks like it fails in compilation / installation.
I think the issue is that the wheels need to be built in the same environment that the tests are run in, i.e. with ninja and a working fortran compiler installed.
I made a branch (kalekundert/py3nj:cibuildwheel
) that refactors the build environment setup steps into their own action, so that they can easily be used in both the test and publish workflows. That avoids the above error, but runs into two more errors:
pip install numpy
doesn't work yet, and there's nothing we can do about that, so I just skip 3.12 for now.On Windows, I get the following error:
+ python -m pip wheel 'D:\a\py3nj\py3nj' '--wheel-dir=C:\Users\runneradmin\AppData\Local\Temp\cibw-run-jhmb54rw\cp38-win32\built_wheel' --no-deps
Processing d:\a\py3nj\py3nj
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
+ meson setup D:\a\py3nj\py3nj D:\a\py3nj\py3nj\.mesonpy-wstaee9t\build -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=D:\a\py3nj\py3nj\.mesonpy-wstaee9t\build\meson-python-native-file.ini
The Meson build system
Version: 1.2.1
Source dir: D:\a\py3nj\py3nj
Build dir: D:\a\py3nj\py3nj\.mesonpy-wstaee9t\build
Build type: native build
Project name: py3nj
Project version: 0.2.2
Fortran compiler for the host machine: gfortran (gcc 11.2.0 "GNU Fortran (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) 11.2.0")
Fortran linker for the host machine: gfortran ld.bfd 2.37
C compiler for the host machine: gcc (gcc 11.2.0 "gcc.exe (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) 11.2.0")
C linker for the host machine: gcc ld.bfd 2.37
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python found: YES (C:\Users\runneradmin\AppData\Local\Temp\cibw-run-jhmb54rw\cp38-win32\build\venv\Scripts\python.exe)
Run-time dependency OpenMP found: YES 4.5
Need python for x86_64, but found x86
Run-time dependency python found: NO (tried sysconfig)
..\..\meson.build:38:3: ERROR: Python dependency not found
A full log can be found at D:\a\py3nj\py3nj\.mesonpy-wstaee9t\build\meson-logs\meson-log.txt
[end of output]
mesonbuild/meson-python#222 might be relevant. I'm suspicious that the static linking is the problem, and that using delvewheel
might be a solution. But for now I just configured the workflow to not make wheels for windows. We already know that the source installation works, so providing a wheel is a convenience rather than a necessity.
Taken over by #31
Adding a CI to publish wheels to PyPI, according to the comment https://github.com/fujiisoup/py3nj/pull/27#issuecomment-1694585707