Error when building Windows wheel
Hi,
I have successfully used mesonpep517
on Linux and macOS, but I cannot seem to do so on Windows, where I get the following error:
Running command 'C:\hostedtoolcache\windows\Python\3.9.9\x64\python.exe' 'C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\RUNNER~1\AppData\Local\Temp\tmpzwthaq5v'
52
C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-f4j_r648\overlay\Lib\site-packages\mesonpep517\pep425tags.py:66: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
53
if get_flag("Py_DEBUG", hasattr(sys, "gettotalrefcount"), warn=precond):
54
Preparing metadata (pyproject.toml): finished with status 'done'
55
Source in d:\a\xraylib\xraylib has version 4.1.1, which satisfies requirement xraylib==4.1.1 from file:///D:/a/xraylib/xraylib
56
Removed xraylib==4.1.1 from file:///D:/a/xraylib/xraylib from build tracker 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pip-req-tracker-2nh2y6a6'
57
Created temporary directory: C:\Users\runneradmin\AppData\Local\Temp\pip-unpack-e97xmt0m
58
Building wheels for collected packages: xraylib
59
Created temporary directory: C:\Users\runneradmin\AppData\Local\Temp\pip-wheel-1in5u0v8
60
Destination directory: C:\Users\runneradmin\AppData\Local\Temp\pip-wheel-1in5u0v8
61
Building wheel for xraylib (pyproject.toml): started
62
Running command 'C:\hostedtoolcache\windows\Python\3.9.9\x64\python.exe' 'C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\RUNNER~1\AppData\Local\Temp\tmpnsxq_kuv'
63
C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-f4j_r648\overlay\Lib\site-packages\mesonpep517\pep425tags.py:66: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
64
if get_flag("Py_DEBUG", hasattr(sys, "gettotalrefcount"), warn=precond):
65
C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-f4j_r648\overlay\Lib\site-packages\mesonpep517\pep425tags.py:66: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
66
if get_flag("Py_DEBUG", hasattr(sys, "gettotalrefcount"), warn=precond):
67
Traceback (most recent call last):
68
File "C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 363, in <module>
69
main()
70
File "C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 345, in main
71
json_out['return_val'] = hook(**hook_input['kwargs'])
72
File "C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 261, in build_wheel
73
return _build_backend().build_wheel(wheel_directory, config_settings,
74
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-f4j_r648\overlay\Lib\site-packages\mesonpep517\buildapi.py", line 371, in build_wheel
75
return WheelBuilder().build(Path(
76
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-f4j_r648\overlay\Lib\site-packages\mesonpep517\buildapi.py", line 347, in build
77
self.wheel_zip = WheelFile(str(target_fp), 'w')
78
File "C:\Users\runneradmin\AppData\Local\Temp\pip-build-env-f4j_r648\overlay\Lib\site-packages\wheel\wheelfile.py", line 55, in __init__
79
ZipFile.__init__(self, file, mode, compression=compression, allowZip64=True)
80
File "C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\zipfile.py", line 1239, in __init__
81
self.fp = io.open(file, filemode)
82
OSError: [Errno 22] Invalid argument: 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pip-wheel-1in5u0v8\\xraylib-4.1.1-cp39-cp39\r-win_amd64.whl'
83
Building wheel for xraylib (pyproject.toml): finished with status 'error'
84
ERROR: Failed building wheel for xraylib
85
Failed to build xraylib
86
ERROR: Could not build wheels for xraylib, which is required to install pyproject.toml-based projects
87
Exception information:
88
Traceback (most recent call last):
89
File "C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\pip\_internal\cli\base_command.py", line 164, in exc_logging_wrapper
90
status = run_func(*args)
91
File "C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\pip\_internal\cli\req_command.py", line 205, in wrapper
92
return func(self, options, args)
93
File "C:\hostedtoolcache\windows\Python\3.9.9\x64\lib\site-packages\pip\_internal\commands\install.py", line 374, in run
94
raise InstallationError(
95
pip._internal.exceptions.InstallationError: Could not build wheels for xraylib, which is required to install pyproject.toml-based projects
96
Removed build tracker: 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\pip-req-tracker-2nh2y6a6'
This happened in a Github Action build.
Not sure how the \r
character ended up in the wheel filename. Any thoughts?
Thanks in advance!