Skip to content

pkg_zip creates the zip file with broken link inside venv #3545

@gfrankliu

Description

@gfrankliu

Using latest rules_python 1.8.2 (venv enabled) and rules_pkg 1.2.0

py_binary(
    name = "app",
    ...
)

pkg_zip(
    name = "app_zip",
    srcs = [":app"],
    include_runfiles = True,
)

When I unzip the app_zip.zip file, I can see all the symlinks inside app.runfiles/_main/utils/_app.venv are broken. They all have one extra ../

I checked unzipped directory structure, those rules_python++pip* directories are wrongly located inside app.runfiles/_main/ while on the build host bazel-bin, they are directly inside app.runfiles, parallel to _main. This caused all symlinks in venv broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions