bazel-contrib / bazel-contrib/rules_python

Make it easier to load wheels from the local file system

Offen
#1,689 1 Kommentar 5 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
type: feature request
Vorherrschende Sprache
Starlark
Sterne
688
Forks
721
Ø Merge
15 Std. 7 Min.
Gemergte PRs (30 T.)
76

Beschreibung

# 🚀 feature request

### Relevant Rules

Possibly in `whl_library`, but more likely in `requirements.txt`

### Description

I had created a patched wheel that I wished to test with Bazel and rules_python *before* publishing it to our internal Artifactory package index. There was no easy way to accomplish this.

I eventually worked out that I could test my patched wheel by using [pip2pi](https://pypi.org/project/pip2pi/) to create a local package index on my filesystem, then adding `--index-url=/tmp/pypi/simple` to the beginning of my `requirements.txt`.

See [this writeup](https://github.com/georgevreilly/torch21?tab=readme-ov-file#using-the-patched-wheel-with-rules_python) for full details.

### Describe the solution you'd like

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

I think the easiest thing for users is if they can specify a file path in `requirements.txt`; e.g.,

```
sympy==1.12
./tmp/torch-2.1.0+stripe.5-cp38-cp38-manylinux1_x86_64.whl
triton==2.1.0
```

Pip allows this, after all.

### Describe alternatives you've considered

Have you considered any alternative solutions or workarounds?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by reading the whl_library and requirements.txt handling in rules_python to trace how dependency entries are parsed and resolved. Check whether existing tests cover local package sources; done means a wheel path in requirements.txt can be consumed by the Bazel rules without requiring publication to an external package index.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
build-system
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.