You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: reimplement writing namespace pkgs in Starlark
With this PR I would like to facilitate the implementation of the venv
layouts because we can in theory take the srcs and the data within
the py_library and then use the expand_template to write the extra
Python files if the namespace_pkgs flag is enabled.
The old Python code has been removed and the extra generated files are
written out with bazel_skylib write_file as a POC. This could be
optimized by writing once and then doing symlinks to the original
instead of writing the files, but I am not sure how this would behave,
maybe fine?
The implicit namespace_pkg init files are included to py_library
if the site-packages config flag is set to false and I think this
may help with continuing the implementation.
NOTE, it seems that the pycross code that we have is using the
namespace_pkg Python code, so that will be removed later in one PR.
Work towards bazel-contrib#2156
0 commit comments