Skip to content

--build_python_zip=false broken on Windows#1840

Description

@KoltesDigital

馃悶 bug report

Affected Rule

The issue is caused by the function **_transition_py_impl** so impacts **py_binary** and **py_test**.

Is this a regression?

The bug was not present with WORKSPACE method.

Description

I can't use --build_python_zip=false anymore.

However this might not be a bad thing. I've put that in .bazelrc a long time ago, when I had some troubles with caches. Maybe this is not needed anyway.

馃敩 Minimal Reproduction

Any repo using rules_python with bzlmod on Windows, I guess.

馃敟 Exception or Error


ERROR: C:/.../BUILD:X:X: in _transition_py_binary rule //:requirements.update:
Traceback (most recent call last):
        File "C:/.../external/rules_python~/python/config_settings/transition.bzl", line 57, column 28, in _transition_py_impl
                ctx.actions.symlink(
Error in symlink: Exactly one of "target_file" or "target_path" is required
ERROR: C:/.../BUILD:X:X: Analysis of target '//:requirements.update' failed

From what I understand, because zipfile is still None, because the previous loop didn't find any zip file in the runfiles.

馃實 Your Environment

Operating System: Windows 10 x64
Output of bazel version:

  
Build label: 7.1.1
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Thu Mar 21 18:11:32 2024 (1711044692)
Build timestamp: 1711044692
Build timestamp as int: 1711044692
  

Rules_python version: 0.31.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions