Can't build a project that contain only ``library()``
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- linux, macos, python
- 领域
- backend, build-system
调研方向
从链接的复现项目中的 meson.build 以及 issue 中描述的 workflow 命令开始,然后比较 Windows、Linux 和 macOS 上的 wheel 构建。复现缺少 .lib 导致的失败,并检查生成的 wheel 标签;完成的标准是一个仅包含库的项目能够在所有报告的平台上构建,并获得预期的 wheel 兼容性标签。
由索引模型根据 Issue 内容生成。
描述
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".
- 主要语言
- Python
- 星标
- 180
- 派生
- 93
- 平均合并
- 20 小时 58 分钟
- 30 天内合并 PR
- 22
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
mesonbuild/meson-python 的其他 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 65/100
mesonbuild/meson-python#541 ·
维护者通常 1 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 65/100
mesonbuild/meson-python#473 · 6 条评论 ·
维护者通常 1 天内回复
-
documentation enhancement tests
难度 5/5 一周以上 新手友好度 45/100
mesonbuild/meson-python#903 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 52/100
mesonbuild/meson-python#871 · 7 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
pip install overrides existing build configuration可能已有人在做 @Alvaro-Kothe 于 113 天前认领。 未关闭question
难度 3/5 1-2 天 新手友好度 68/100
mesonbuild/meson-python#851 · 6 条评论 ·
维护者通常 1 天内回复
查看 mesonbuild/meson-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
Juniper/ansible-junos-stdlib#904 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
pollen-robotics/reachy_mini#1457 ·
维护者通常 1 天内回复
-
area:runtime good first issue
难度 2/5 1-3 小时 新手友好度 72/100
WATonomous/wato_f1tenth#39 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
FireDynamics/fdsreader#123 ·
-
难度 1/5 1 小时以内 新手友好度 85/100