Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ END_UNRELEASED_TEMPLATE
* (venvs) {obj}`--venvs_site_packages=yes` works for packages that dynamically
link to shared libraries
([#3228](https://github.com/bazel-contrib/rules_python/issues/3228)).
* (venvs) {obj}`--venvs_site_packages=yes` includes `pth` files at the root of the
site-packages folder
([#3339](https://github.com/bazel-contrib/rules_python/issues/3339)).
* (uv) {obj}`//python/uv:lock.bzl%lock` now works with a local platform
runtime.
* (toolchains) WORKSPACE builds now correctly register musl and freethreaded
Expand Down
1 change: 1 addition & 0 deletions python/private/common.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ PYTHON_FILE_EXTENSIONS = [
"dylib", # Python C modules, Mac specific
"py",
"pyc",
"pth", # import 'pth' files
"pyi",
"so", # Python C modules, usually Linux
]
Expand Down
3 changes: 2 additions & 1 deletion python/private/venv_runfiles.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,10 @@ def get_venv_symlinks(ctx, files, package, version_str, site_packages_root):
entry = VenvSymlinkEntry(
kind = VenvSymlinkKind.LIB,
link_to_path = paths.join(runfiles_dir_name, site_packages_root, filename),
link_to_file = src,
package = package,
version = version_str,
venv_path = filename,
venv_path = path,
files = depset([src]),
)
venv_symlinks.append(entry)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ def _test_shared_library_symlinking(name):
"site-packages/foo.libs/libx.so",
"site-packages/foo/a.py",
"site-packages/foo/b.so",
"site-packages/root.pth",
"site-packages/root.py",
"site-packages/root.so",
],
)
analysis_test(
Expand Down Expand Up @@ -314,6 +317,9 @@ def _test_shared_library_symlinking_impl(env, target):
"bar/y.so": srcs[2],
"foo": "_main/tests/venv_site_packages_libs/app_files_building/site-packages/foo",
"foo.libs/libx.so": srcs[3],
"root.pth": srcs[-3],
"root.py": srcs[-2],
"root.so": srcs[-1],
}
env.expect.that_dict(actual[VenvSymlinkKind.LIB]).contains_exactly(expected_libs)

Expand Down