bazel-contrib / bazel-contrib/rules_python

Missing config settings for multiple python versions

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

描述

# 🐞 bug report

### Affected Rule

`pip.parse`

### Is this a regression?

Probably not

### Description

If you have a requirements file that pulls in wheels with manual URLs with different python version constraints, you get an error about missing internal config settings

## 🔬 Minimal Reproduction

https://github.com/bazel-contrib/rules_python/pull/2848

```
--index-url https://pypi.org/simple

gptqmodel @ https://github.com/ModelCloud/GPTQModel/releases/download/v2.0.0/gptqmodel-2.0.0+cu126torch2.6-cp310-cp310-linux_x86_64.whl ; python_full_version == '3.10.*' and sys_platform == 'linux'
gptqmodel @ https://github.com/ModelCloud/GPTQModel/releases/download/v2.0.0/gptqmodel-2.0.0+cu126torch2.6-cp311-cp311-linux_x86_64.whl ; python_full_version == '3.11.*' and sys_platform == 'linux'
gptqmodel @ https://github.com/ModelCloud/GPTQModel/releases/download/v2.0.0/gptqmodel-2.0.0+cu126torch2.6-cp312-cp312-linux_x86_64.whl ; python_full_version >= '3.12' and python_full_version < '3.14' and sys_platform == 'linux'
gptqmodel @ https://github.com/ModelCloud/GPTQModel/releases/download/v2.0.0/gptqmodel-2.0.0+cu126torch2.6-cp39-cp39-linux_x86_64.whl ; python_full_version < '3.10' and sys_platform == 'linux'
```

## 🔥 Exception or Error

```
bazel query 'deps(...)'
ERROR: Evaluation of query "deps(...)" failed: preloading transitive closure failed: no such target '@@rules_python++pip+pip//_config:is_cp39_cp311_linux_x86_64': target 'is_cp39_cp311_linux_x86_64' not declared in package '_config' defined by /home/ubuntu/.cache/bazel/_bazel_ubuntu/46f0c9813505c30d178a2aff399354ea/external/rules_python++pip+pip/_config/BUILD.bazel (did you mean is_cp39_cp39_linux_x86_64, is_cp39_cp39t_linux_x86_64, _is_cp39_cp39_linux_x86_64, or _is_cp39_cp39t_linux_x86_64?)
Loading: 1 packages loaded
Fetching repository @@rules_python++pip+pip_39_gptqmodel_2_0_0_cu126torch2_6_cp39_cp39_linux_x86_64; starting
Fetching repository @@rules_python++pip+pip_39_gptqmodel_2_0_0_cu126torch2_6_cp312_cp312_linux_x86_64; starting
Fetching repository @@rules_python++pip+pip_39_gptqmodel_2_0_0_cu126torch2_6_cp310_cp310_linux_x86_64; starting
```

## 🌍 Your Environment

**Operating System:**

  

linux x86_64

**Output of `bazel version`:**

  

8.2.1

**Rules_python version:**

https://github.com/bazelbuild/rules_python//commit/189e30df4001d34aba590e0267d3e5f72e6d8b19

贡献指南

打开贡献指南

调研方向

从 pip.parse 入口开始,使用 Bazel 8.2.1 的 bazel query 命令重现报告中的 requirements 文件。检查生成的 _config/BUILD.bazel targets,尤其是缺失的 is_cp39_cp311_linux_x86_64 target。完成的标准是:重现中的受支持 Python 版本组合能够解析,且不会出现 missing-config-target 错误。

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

评估

技术栈
python
领域
build-system
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
32/100

把新 issue 发到你的邮箱

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