bazel-contrib / bazel-contrib/rules_python

Override a requirement with a Bazel target

オープン
#385 コメント 15 件 リアクション 14 件 担当者 0 名 GitHub で見る
type: feature request
主要言語
Starlark
スター
688
フォーク
721
平均マージ
15時間 7分
マージ済み PR(30日)
76

説明

# 🚀 feature request

### Relevant Rules

`load("@rules_python//python:pip.bzl", "pip_install")`

### Description

We'd like to be able to override a `requirement` with a Bazel target. This is basically the `rules_python` equivalent of `rules_jvm_external`'s [`override_targets` directive](https://github.com/bazelbuild/rules_jvm_external#overriding-generated-targets).

Consider the case where we're using grpc and protobuf from Bazel, and an external python library depends on `protobuf==3.13.0` (or whatever). I'd like to replace that dependency with `"@com_google_protobuf//:protobuf_python"` instead, so I'm not mixing pypi and Bazel versions of `protobuf`.

### Describe the solution you'd like

I like the way that `rules_jvm_external` has done it.

### Describe alternatives you've considered

ø

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。