bazel-contrib / bazel-contrib/rules_python

feat: support bazel (rules_python) as a PEP-517 backend

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

説明

# 🚀 feature request

Probably very low priority, but having support for `pyproject.toml` would be awesome. Maybe for the first pass `rules_python` can support parsing `[project]` and other fields as metadata

### Relevant Rules

`py_wheel`

### Description

A clear and concise description of the problem or missing capability...

### Describe the solution you'd like

An example `pyproject.toml`:

```python
[build-system]
requires = ["setuptools>=65", "setuptools_scm[toml]>=7", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "my_project"
description = "description"
readme = { file = "README.md", content-type = "text/markdown" } # P1?
requires-python = ">=3.8"
version = "0.0.1"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
```

and its corresponding rule:

```starlark
py_wheel(
name = "my_wheel",
pyproject_toml = "://pyproject.toml"
)
```

### Describe alternatives you've considered.

I can contribute the implementation upstream if this makes sense. I believe we already have tomli available so it should be relatively straightforward for implementation.

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

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

調査の方向性

まず既存の py_wheel ルールと、rules_python が現在 wheel メタデータをどのように扱っているかを確認し、次に利用可能な tomli 依存関係で pyproject.toml を解析できることを確認します。対応するフィールドをカバーしたうえで、py_wheel ターゲットが示された [project] メタデータを受け取り、対応する wheel を生成できれば、作業は完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
build-system
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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