rules_python
rules_python copied to clipboard
repository_ctx.patch on Windows results in files with different file endings than on UNIX
See https://github.com/bazelbuild/rules_python/pull/1637#issuecomment-1863705889
The error from the bzlmod example on Windows (Linux passed) is:
...
Repository rule whl_library defined at:
C:/b/kyconxba/external/rules_python~override/python/pip_install/pip_repository.bzl:876:30: in <toplevel>
(01:11:35) ERROR: An error occurred during the fetch of repository 'rules_python~override~pip~pip_39_requests':
Traceback (most recent call last):
File "C:/b/kyconxba/external/rules_python~override/python/pip_install/pip_repository.bzl", line 737, column 29, in _whl_library_impl
whl_path = patch_whl(
File "C:/b/kyconxba/external/rules_python~override/python/private/patch_whl.bzl", line 91, column 13, in patch_whl
fail(
Error in fail: repackaging .whl requests-2.25.1-py2.py3-none-any.whl failed: with exit code '1':
stderr:
repack_whl: DEBUG: ================================================================================
repack_whl: DEBUG: Repackaging the wheel
repack_whl: DEBUG: ================================================================================
repack_whl: DEBUG: Created a tmpdir: C:\b\kyconxba\external\rules_python~override~pip~pip_39_requests\tmp_9qzsuze
repack_whl: DEBUG: Moving whl contents to the newly created tmpdir
repack_whl: DEBUG: mv C:\b\kyconxba\external\rules_python~override~pip~pip_39_requests\requests -> C:\b\kyconxba\external\rules_python~override~pip~pip_39_requests\tmp_9qzsuze\requests
repack_whl: DEBUG: Ignoring: C:\b\kyconxba\external\rules_python~override~pip~pip_39_requests\requests-2.25.1-py2.py3-none-any.whl
repack_whl: DEBUG: mv C:\b\kyconxba\external\rules_python~override~pip~pip_39_requests\requests-2.25.1.dist-info -> C:\b\kyconxba\external\rules_python~override~pip~pip_39_requests\tmp_9qzsuze\requests-2.25.1.dist-info
repack_whl: DEBUG: Ignoring: C:\b\kyconxba\external\rules_python~override~pip~pip_39_requests\tmp_9qzsuze
repack_whl: DEBUG: Found dist-info dir: C:\b\kyconxba\external\rules_python~override~pip~pip_39_requests\tmp_9qzsuze\requests-2.25.1.dist-info
repack_whl: DEBUG: Writing RECORD file
repack_whl: ERROR: Please also patch the RECORD file with:
a/requests-2.25.1.dist-info/RECORD
b/requests-2.25.1.dist-info/RECORD
@@ -17,7 +17,7 @@
requests/structures.py,sha256=msAtr9mq1JxHd-JRyiILfdFlpbJwvvFuP3rfUQT_QxE,3005
requests/utils.py,sha256=_K9AgkN6efPe-a-zgZurXzds5PBC0CzDkyjAE2oCQFQ,30529
requests-2.25.1.dist-info/LICENSE,sha256=CeipvOyAZxBGUsFoaFqwkx54aPnIKEtm9a5u2uXxEws,10142
-requests-2.25.1.dist-info/METADATA,sha256=fRSAA0u0Bi0heD4zYq91wdNUTJlbzhK6_iDOcRRNDx4,4177
+requests-2.25.1.dist-info/METADATA,sha256=FIRoD6JzkS0gW2tgRJemIR-Dj9FVZPLY7ALIWbib-bg,4280
requests-2.25.1.dist-info/WHEEL,sha256=Z-nyYpwrcSqxfdux5Mbn_DQ525iP7J2DG3JgGvOYyTQ,110
requests-2.25.1.dist-info/top_level.txt,sha256=fMSVmHfb5rbGOo6xv-O_tUX6j-WyixssE-SnwcDRxNQ,9
requests-2.25.1.dist-info/RECORD,,
NoneType: None
(01:11:35) ERROR: <builtin>: fetching whl_library rule @rules_python~override//python/extensions:rules_python~override~pip~pip_39_requests: Traceback (most recent call last):
File "C:/b/kyconxba/external/rules_python~override/python/pip_install/pip_repository.bzl", line 737, column 29, in _whl_library_impl
whl_path = patch_whl(
File "C:/b/kyconxba/external/rules_python~override/python/private/patch_whl.bzl", line 91, column 13, in patch_whl
fail(
Error in fail: repackaging .whl requests-2.25.1-py2.py3-none-any.whl failed: with exit code '1':
This is fixed in bazelbuild/bazel@07e0d316a345a3cb2593f98525320590bbc56e30. We can close this once we only support 7 and above. Then the warning message in the code introduced in #1637 can be removed.
This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days. Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_python!