bazel-contrib / bazel-contrib/rules_python

python gazelle: ignore "binaries" when generating py_librarys

Open
#2,443 1 comment 0 reactions 0 assignees View on GitHub
gazelle
Dominant language
Starlark
Stars
688
Forks
721
Avg merge
15h 7m
Merged PRs (30d)
76

Description

# 🚀 feature request

### Relevant Rules

- rules_python

### Description

A clear and concise description of the problem or missing capability...

Add a config for python gazelle module to ignore "binary" files from the`srcs` of the `py_library` generated code.

By "binary" file I mean the logic that gazelle uses to define what src is used by a generated `py_binary`

### Describe the solution you'd like

If you have a solution in mind, please describe it.

### Describe alternatives you've considered

Have you considered any alternative solutions or workarounds?

Contributor guide

Open the contributing guide

Research direction

Start by locating the Python Gazelle module and the logic that determines sources for generated py_binary and py_library targets. Define the requested configuration's behavior for binary files and verify that generated py_library srcs omit them while py_binary source detection remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.