Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dist-info symlinks are missing when using venvs_site_packages #2845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
emirisman opened this issue Apr 29, 2025 · 1 comment
Open

dist-info symlinks are missing when using venvs_site_packages #2845

emirisman opened this issue Apr 29, 2025 · 1 comment

Comments

@emirisman
Copy link

emirisman commented Apr 29, 2025

🐞 bug report

Affected Rule

private/py_library.bzl

Is this a regression?

No, venvs_site_packages feature is new in 1.4.0-rc0 and later

Description

The dist-info folders are not symlinked to site-packages when using venvs_site_packages=yes
Using Bazel 7.6.1, bzlmod enabled but rules_python used via WORKSPACE, with the following settings:


--@rules_python//python/config_settings:venvs_site_packages=yes
--@rules_python//python/config_settings:bootstrap_impl=script

πŸ”¬ Minimal Reproduction

Using transformers package that checks its dependencies' versions using importlib.metadata, which depends on dist-info of the dependencies, leading to the error below:

πŸ”₯ Exception or Error


  File "[target].venv/lib/python3.11/site-packages/transformers/__init__.py", line 26, in 
    from . import dependency_versions_check
  File "[target].venv/lib/python3.11/site-packages/transformers/dependency_versions_check.py", line 57, in 
    require_version_core(deps[pkg])
  File "[target].venv/lib/python3.11/site-packages/transformers/utils/versions.py", line 117, in require_version_core
    return require_version(requirement, hint)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[target].venv/lib/python3.11/site-packages/transformers/utils/versions.py", line 104, in require_version
    raise importlib.metadata.PackageNotFoundError(
importlib.metadata.PackageNotFoundError: No package metadata was found for The 'tqdm>=4.27' distribution was not found and is required by this application. 
Try: `pip install transformers -U` or `pip install -e '.[dev]'` if you're working with git main

🌍 Your Environment

Operating System:

  
Ubuntu 22.04 LTS
  

Output of bazel version:

  
Bazelisk version: v1.26.0
Build label: 7.6.1
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Mon Mar 31 17:08:56 2025 (1743440936)
Build timestamp: 1743440936
Build timestamp as int: 1743440936
  

Rules_python version:

1.4.0-rc3

@aignas
Copy link
Collaborator

aignas commented Apr 29, 2025

Thank you for the report.

Since this is a new feature and not even stabilized, this will will be done at a later time. I linked it to the correct parent ticket though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants