bazel-contrib / bazel-contrib/rules_python

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

Aperta
#1,103 10 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Starlark
Stelle
688
Fork
721
Merge medio
15h 7m
PR unite (30g)
76

Descrizione

# 🚀 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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia esaminando la regola py_wheel esistente e il modo in cui rules_python gestisce attualmente i metadati delle wheel, quindi verifica come la dipendenza tomli disponibile può analizzare pyproject.toml. Il lavoro è completato quando un target py_wheel può utilizzare i metadati [project] mostrati e produrre la wheel corrispondente, con copertura per i campi supportati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
build-system
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.