build(python): vendor rpycdec #17
7
third_party/python/BUILD.bazel
vendored
7
third_party/python/BUILD.bazel
vendored
@@ -1,10 +1,11 @@
|
||||
load("@rules_python//python:defs.bzl", "py_binary")
|
||||
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
alias(
|
||||
py_library(
|
||||
name = "rpycdec",
|
||||
actual = "//third_party/python/rpycdec-0.1.13+489e9c6:rpycdec",
|
||||
srcs = glob(["rpycdec/src/**/*.py"]),
|
||||
imports = ["rpycdec/src"],
|
||||
)
|
||||
|
||||
py_binary(
|
||||
|
||||
13
third_party/python/README.md
vendored
13
third_party/python/README.md
vendored
@@ -3,26 +3,25 @@
|
||||
This package exposes vendored Python dependencies through stable public Bazel targets.
|
||||
Bazel uses `PYTHON_TOOLCHAIN_ROOT` to find the monorepo `python3` runtime.
|
||||
|
||||
Project code depends on aliases in `//third_party/python`.
|
||||
It does not depend on versioned package directories directly.
|
||||
Project code depends on targets in `//third_party/python`.
|
||||
It does not depend on files inside vendored source directories directly.
|
||||
|
||||
Use this layout for a vendored package:
|
||||
|
||||
```text
|
||||
third_party/python/
|
||||
BUILD.bazel
|
||||
<name>-<version>/
|
||||
BUILD.bazel
|
||||
<name>/
|
||||
LICENSE
|
||||
pyproject.toml
|
||||
src/
|
||||
```
|
||||
|
||||
Use the upstream package name for public aliases.
|
||||
Use the upstream package name for library targets.
|
||||
For command-line tools, add a `_bin` suffix to the binary target.
|
||||
|
||||
Preserve upstream license files and package metadata.
|
||||
Keep repository Bazel files separate from upstream source when possible.
|
||||
Keep repository Bazel files outside upstream source when possible.
|
||||
|
||||
Add optional dependencies as separate public targets.
|
||||
Do not bundle optional dependencies into the primary package target.
|
||||
@@ -34,7 +33,7 @@ Ariadne uses the game-bundled Ren'Py runtime for AST export.
|
||||
|
||||
The vendored source comes from `cnfatal/rpycdec` at commit `489e9c6b8a48ed7904d7039d7787c36a03c75fe3`.
|
||||
|
||||
The intended public targets are:
|
||||
The public targets are:
|
||||
|
||||
```text
|
||||
//third_party/python:rpycdec
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
load("@rules_python//python:defs.bzl", "py_library")
|
||||
|
||||
package(default_visibility = ["//third_party/python:__pkg__"])
|
||||
|
||||
py_library(
|
||||
name = "rpycdec",
|
||||
srcs = glob(["src/**/*.py"]),
|
||||
imports = ["src"],
|
||||
)
|
||||
Reference in New Issue
Block a user