Skip to content

repository_ctx.patch on Windows results in files with different file endings than on UNIX #1639

@aignas

Description

@aignas

See #1637 (comment)

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':

Metadata

Metadata

Assignees

No one assigned

    Labels

    Can Close?Will close in 30 days if there is no new activity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions