bazel-contrib / bazel-contrib/rules_python

Add a `pip_parse` attribute to pass an SSL certificate

未关闭
#3,915 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
help wanted P4 type: pip
主要语言
Starlark
星标
688
派生
721
平均合并
15 小时 7 分钟
30 天内合并 PR
76

描述

# 🚀 feature request

### Relevant Rules

I would like to add support for passing additional files to the `pip_parse` rule.

### Description

This feature request is a follow-up to https://github.com/bazel-contrib/rules_python/issues/3858.

After passing a custom certificate to `compile_pip_requirements`, we also need a way to pass a custom certificate, or another pip-related file (i.e. pip config with a certificate), to `pip_parse`.

I tried to find a way to do this, but it looks like `pip_parse` does not currently accept data or another label-based attribute for passing extra files to the repository rule.

### Describe the solution you'd like

I would like pip_parse to support an additional label-based attribute for files needed by pip, for example `extra_files`, `pip_config`, or `ssl_cert`.

The most general option seems to be something like `extra_files`, because certificates can be passed to pip in more than one way: `--cert=`, `PIP_CERT`, or `PIP_CONFIG_FILE`.

### Describe alternatives you've considered

The main alternative I considered is passing the pip config file or SSL certificate through `PIP_CONFIG_FILE` or `PIP_CERT` environment variables. However, this requires using raw paths, while I would prefer a Bazel-native labels approach.

If there is already a supported way to do such thing, please let me know.

贡献指南

打开贡献指南

调研方向

Start by inspecting the pip_parse rule and the follow-up issue 3858 to understand how compile_pip_requirements passes certificate-related files. Determine how a label-based extra file can reach pip, then verify that pip_parse accepts the chosen attribute and supports the certificate or pip configuration use cases described here.

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
build-system
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。