Skip to content

Ability to disable pycache symlinks #4198

Description

@stevendee-recon

#3661 made python_repository write __pycache__ symlinks with targets that escape Bazel. Since the repository sets reproducible = True, these links get stored in the repository contents cache and shared. This can lead to surprises, as the symlink target validity varies by host system.

The recommended opt-out procedure is to set RULES_PYTHON_PYCACHE_DIR=/dev/null. But this winds up littering the repository cache with a bunch of symlinks to a character device, which, when processed by tar.bzl, become literal character devices and prevent any py_binary being packaged into a tar layer.

There should be a way to completely disable the #3661 functionality and get a repository without any __pycache__ symlinks at all.

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions