mesonbuild / mesonbuild/meson-python
Can't build a project that contain only ``library()``
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 180
- Fork
- 93
- Merge medio
- 2g 7h
- PR unite (30g)
- 18
Descrizione
Problem 1
When building my wheel on windows, I get this error:
[1/2] D:\a\test_meson\test_meson\.mesonpy-v0dib87v\example.dll
[2/2] D:\a\test_meson\test_meson\.mesonpy-v0dib87v\example.lib
Traceback (most recent call last):
File "C:\hostedtoolcache\windows\Python\3.13.12\x64\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 389, in <module>
main()
~~~~^^
File "C:\hostedtoolcache\windows\Python\3.13.12\x64\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\hostedtoolcache\windows\Python\3.13.12\x64\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 280, in build_wheel
return _build_backend().build_wheel(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
wheel_directory, config_settings, metadata_directory
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "C:\Users\runneradmin\AppData\Local\Temp\build-env-03i4_as2\Lib\site-packages\mesonpy\__init__.py", line 1203, in wrapper
return func(*args, **kwargs)
File "C:\Users\runneradmin\AppData\Local\Temp\build-env-03i4_as2\Lib\site-packages\mesonpy\__init__.py", line 1257, in build_wheel
return project.wheel(out).name
~~~~~~~~~~~~~^^^^^
File "C:\Users\runneradmin\AppData\Local\Temp\build-env-03i4_as2\Lib\site-packages\mesonpy\__init__.py", line 1100, in wheel
return builder.build(directory)
~~~~~~~~~~~~~^^^^^^^^^^^
File "C:\Users\runneradmin\AppData\Local\Temp\build-env-03i4_as2\Lib\site-packages\mesonpy\__init__.py", line 511, in build
self._install_path(whl, src, dst)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "C:\Users\runneradmin\AppData\Local\Temp\build-env-03i4_as2\Lib\site-packages\mesonpy\__init__.py", line 465, in _install_path
wheel_file.write(origin, destination.as_posix())
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\runneradmin\AppData\Local\Temp\build-env-03i4_as2\Lib\site-packages\mesonpy\_wheelfile.py", line 97, in write
with open(filename, 'rb') as f:
~~~~^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\a\\test_meson\\test_meson\\.mesonpy-v0dib87v\\example.lib'
ERROR Backend subprocess exited when trying to invoke build_wheel
Problem 2
On platform where I can build the wheel without issue, even thought I don't use python extension, the wheel is named like this: example-1.0.0-cp313-cp313-linux_x86_64.whl, example-1.0.0-cp313-cp313-macosx_15_0_arm64.whl.
I would have expected to be example-1.0.0-py3-none-linux_x86_64.whl, example-1.0.0-py3-none-macosx_15_0_arm64.whl.
How to reproduce
You can get the project here: https://github.com/moi15moi/test_meson
It is a really simple project. The meson.build just contain a library().
Note that you can see how I builded the wheel in the workflow: https://github.com/moi15moi/test_meson/actions/runs/24110794731
On unix, I used the command python -m build --wheel and on windows, I used the command python -m build --wheel -Csetup-args="--vsenv".
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dal meson.build nel progetto di riproduzione collegato e dai comandi del workflow descritti nell’issue, quindi confronta le build delle wheel su Windows, Linux e macOS. Riproduci l’errore dovuto alla mancanza di .lib e controlla i tag delle wheel generate; il lavoro è completato quando un progetto composto solo da una libreria viene compilato su tutte le piattaforme segnalate e riceve i tag di compatibilità delle wheel previsti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- linux, macos, python
- Ambito
- backend, build-system
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 52/100