rules_python icon indicating copy to clipboard operation
rules_python copied to clipboard

Duplicate python libs

Open junyousician opened this issue 7 years ago • 1 comments

When using the python rule for building, there are duplicate python libs symlinks for example:

bazel-out/darwin-fastbuild/bin/<app>/app.runfiles/pypi__Jinja2_2_8 and bazel-out/darwin-fastbuild/bin/<app>/app.runfiles/__main__/external/pypi__Jinja2_2_8

both of them are the symlinks of the lib exists on my local machine path /private/var/tmp/.../external/pypi__Jinja2_2_8

Since we package our app to zip file for deployment, libs will get copied twice to the zip file when zipping app.runfiles folder. Is this behavior normal or do we doing the bazel app packaging wrong?

junyousician avatar Aug 20 '18 11:08 junyousician

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!

github-actions[bot] avatar Apr 14 '21 22:04 github-actions[bot]

This is a very old bug. Please provide a reproduction using a modern version of rules_python.

In terms of something specific to try, you could try using the built-in --build_python_zip functionality or the output group.

filegroup(
  name = "foo_zip",
  srcs=  ["//bar:foo"],
  output_group = "python_zip_file",
)

groodt avatar Aug 14 '22 06:08 groodt