bazel-contrib / bazel-contrib/rules_python

Complete working example using a package from pypi

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

描述

# 🐞 bug report

### Description

I'm trying to create a project that uses restructured text and I want to use the
rstfmt package. I can install this manually on windows but I thought I'd try to
use bazel to make this easier for future users.

I tried following the [pip_parse](https://github.com/bazelbuild/rules_python/tree/main/examples/pip_parse) examples but it's not complete. No python
interpreter is specified and I can't figure out how to make it work. Can we add
a complete, working example? If specific versions of bazel is required please
specify as a comment in the example.

## 🌍 Your Environment

**Operating System:**

  

Window 10

**Output of `bazel version`:**

  

bazel version
Bazelisk version: v1.19.0
Build label: 7.0.2
Build target: @@//src/main/java/com/google/devtools/build/lib/bazel:BazelServer
Build time: Thu Jan 25 16:15:43 2024 (1706199343)
Build timestamp: 1706199343
Build timestamp as int: 1706199343

**Rules_python version:**

  

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_python",
integrity = "sha256-1x0sZ+C86YbhxadzG0aTImhnxFv+C3xeAGciilNvxYA=",
strip_prefix = "rules_python-0.29.0",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.29.0.tar.gz",
)

**Anything else relevant?**

I'm invoking bazel in a user mode power shell.

贡献指南

打开贡献指南

调研方向

从报告中展示的链接 pip_parse 示例和 rules_python 0.29.0 设置开始;使用 Bazel 7.0.2 在 Windows 上复现 rstfmt 的安装。记录一个完整且可运行的示例,包括 Python 解释器选择和任何所需的 Bazel 版本,并从用户模式的 PowerShell 中进行验证。

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

评估

技术栈
python
领域
build-system, documentation
Issue 类型
文档
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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