bazel-contrib/rules_python

[FR] (gazelle) Use specified python version to determine whether a module is a stdlib

Open

#1,901 opened on May 15, 2024

View on GitHub
 (0 comments) (2 reactions) (0 assignees)Starlark (705 forks)auto 404
gazellehelp wanted

Repository metrics

Stars
 (679 stars)
PR merge metrics
 (PR metrics pending)

Description

🚀 feature request

Relevant Rules

At present, we judge whether a module is a standard library through the system interpreter, which is uncontrollable. After https://github.com/bazelbuild/rules_python/pull/1895 landing, we have the ability to use a specific python version of std list in this analysis.

Description

Describe the solution you'd like

Maybe two ways:

  1. A new directive to specify the python version
  2. Read .manifest.pip_repository from gazelle_python.yaml and find python version from MODULE.bazel?

Describe alternatives you've considered

Contributor guide