feat!: make windows use full venvs#3680
feat!: make windows use full venvs#3680rickeylev wants to merge 17 commits intobazel-contrib:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors Python virtual environment (venv) creation to support platform-specific requirements, particularly for Windows, including the addition of a venv_bin_files attribute to PyRuntimeInfo for including DLLs and PDBs. The changes also update the bootstrap templates to handle Windows-specific pathing, pyvenv.cfg generation, and zip-app execution. Feedback from the review points out a global hardcoding of build_zip_enabled that should be restricted to Windows, redundant logic in the Unix venv creation path, and a bug in the bootstrap template where a function was incorrectly evaluated as a variable. Additionally, minor issues regarding PEP 8 formatting and a placeholder version string in the documentation were noted.
…python into sys.py.win.venv
…into sys.py.win.venv
This makes Windows use a full venv to better align it with the unixy
implementations.
Unfortunately, it has to recreate the venv at runtime because Bazel
incorrectly canonicalizes relative symlinks on Windows. This isn't ideal,
however, Windows builds were already going through a zip-unzip process,
so creating a handful of symlinks seems like an improvement overall.
Note that this requires symlink support be enabled in Bazel and Windows.
If both aren't enabled, then weird errors will occur due to junctions pointing
to files being created instead of symlinks.