diff --git a/third_party/python/BUILD.bazel b/third_party/python/BUILD.bazel index 00de296..105293a 100644 --- a/third_party/python/BUILD.bazel +++ b/third_party/python/BUILD.bazel @@ -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( diff --git a/third_party/python/README.md b/third_party/python/README.md index c913308..aa03144 100644 --- a/third_party/python/README.md +++ b/third_party/python/README.md @@ -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 - -/ - BUILD.bazel + / 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 diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/BUILD.bazel b/third_party/python/rpycdec-0.1.13+489e9c6/BUILD.bazel deleted file mode 100644 index 899da03..0000000 --- a/third_party/python/rpycdec-0.1.13+489e9c6/BUILD.bazel +++ /dev/null @@ -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"], -) diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/.github/workflows/python-publish.yml b/third_party/python/rpycdec/.github/workflows/python-publish.yml similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/.github/workflows/python-publish.yml rename to third_party/python/rpycdec/.github/workflows/python-publish.yml diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/.gitignore b/third_party/python/rpycdec/.gitignore similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/.gitignore rename to third_party/python/rpycdec/.gitignore diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/.pylintrc b/third_party/python/rpycdec/.pylintrc similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/.pylintrc rename to third_party/python/rpycdec/.pylintrc diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/DEVELOP.md b/third_party/python/rpycdec/DEVELOP.md similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/DEVELOP.md rename to third_party/python/rpycdec/DEVELOP.md diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/LICENSE b/third_party/python/rpycdec/LICENSE similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/LICENSE rename to third_party/python/rpycdec/LICENSE diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/Makefile b/third_party/python/rpycdec/Makefile similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/Makefile rename to third_party/python/rpycdec/Makefile diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/README.md b/third_party/python/rpycdec/README.md similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/README.md rename to third_party/python/rpycdec/README.md diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/pyproject.toml b/third_party/python/rpycdec/pyproject.toml similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/pyproject.toml rename to third_party/python/rpycdec/pyproject.toml diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/__init__.py b/third_party/python/rpycdec/src/renpy/__init__.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/__init__.py rename to third_party/python/rpycdec/src/renpy/__init__.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/ast.py b/third_party/python/rpycdec/src/renpy/ast.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/ast.py rename to third_party/python/rpycdec/src/renpy/ast.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/astsupport.py b/third_party/python/rpycdec/src/renpy/astsupport.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/astsupport.py rename to third_party/python/rpycdec/src/renpy/astsupport.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/atl.py b/third_party/python/rpycdec/src/renpy/atl.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/atl.py rename to third_party/python/rpycdec/src/renpy/atl.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/config.py b/third_party/python/rpycdec/src/renpy/config.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/config.py rename to third_party/python/rpycdec/src/renpy/config.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/display/behavior.py b/third_party/python/rpycdec/src/renpy/display/behavior.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/display/behavior.py rename to third_party/python/rpycdec/src/renpy/display/behavior.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/display/core.py b/third_party/python/rpycdec/src/renpy/display/core.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/display/core.py rename to third_party/python/rpycdec/src/renpy/display/core.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/display/dragdrop.py b/third_party/python/rpycdec/src/renpy/display/dragdrop.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/display/dragdrop.py rename to third_party/python/rpycdec/src/renpy/display/dragdrop.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/display/layout.py b/third_party/python/rpycdec/src/renpy/display/layout.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/display/layout.py rename to third_party/python/rpycdec/src/renpy/display/layout.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/display/transform.py b/third_party/python/rpycdec/src/renpy/display/transform.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/display/transform.py rename to third_party/python/rpycdec/src/renpy/display/transform.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/lexer.py b/third_party/python/rpycdec/src/renpy/lexer.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/lexer.py rename to third_party/python/rpycdec/src/renpy/lexer.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/object.py b/third_party/python/rpycdec/src/renpy/object.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/object.py rename to third_party/python/rpycdec/src/renpy/object.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/parameter.py b/third_party/python/rpycdec/src/renpy/parameter.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/parameter.py rename to third_party/python/rpycdec/src/renpy/parameter.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/pyanalysis.py b/third_party/python/rpycdec/src/renpy/pyanalysis.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/pyanalysis.py rename to third_party/python/rpycdec/src/renpy/pyanalysis.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/python.py b/third_party/python/rpycdec/src/renpy/python.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/python.py rename to third_party/python/rpycdec/src/renpy/python.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/revertable.py b/third_party/python/rpycdec/src/renpy/revertable.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/revertable.py rename to third_party/python/rpycdec/src/renpy/revertable.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/script.py b/third_party/python/rpycdec/src/renpy/script.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/script.py rename to third_party/python/rpycdec/src/renpy/script.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/sl2/slast.py b/third_party/python/rpycdec/src/renpy/sl2/slast.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/sl2/slast.py rename to third_party/python/rpycdec/src/renpy/sl2/slast.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/sl2/sldisplayables.py b/third_party/python/rpycdec/src/renpy/sl2/sldisplayables.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/sl2/sldisplayables.py rename to third_party/python/rpycdec/src/renpy/sl2/sldisplayables.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/test/__init__.py b/third_party/python/rpycdec/src/renpy/test/__init__.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/test/__init__.py rename to third_party/python/rpycdec/src/renpy/test/__init__.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/text/extras.py b/third_party/python/rpycdec/src/renpy/text/extras.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/text/extras.py rename to third_party/python/rpycdec/src/renpy/text/extras.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/text/font.py b/third_party/python/rpycdec/src/renpy/text/font.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/text/font.py rename to third_party/python/rpycdec/src/renpy/text/font.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/text/text.py b/third_party/python/rpycdec/src/renpy/text/text.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/text/text.py rename to third_party/python/rpycdec/src/renpy/text/text.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/translation/__init__.py b/third_party/python/rpycdec/src/renpy/translation/__init__.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/translation/__init__.py rename to third_party/python/rpycdec/src/renpy/translation/__init__.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/translation/generation.py b/third_party/python/rpycdec/src/renpy/translation/generation.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/translation/generation.py rename to third_party/python/rpycdec/src/renpy/translation/generation.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/translation/scanstrings.py b/third_party/python/rpycdec/src/renpy/translation/scanstrings.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/translation/scanstrings.py rename to third_party/python/rpycdec/src/renpy/translation/scanstrings.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/ui.py b/third_party/python/rpycdec/src/renpy/ui.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/ui.py rename to third_party/python/rpycdec/src/renpy/ui.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/util.py b/third_party/python/rpycdec/src/renpy/util.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/renpy/util.py rename to third_party/python/rpycdec/src/renpy/util.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/__init__.py b/third_party/python/rpycdec/src/rpycdec/__init__.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/__init__.py rename to third_party/python/rpycdec/src/rpycdec/__init__.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/__main__.py b/third_party/python/rpycdec/src/rpycdec/__main__.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/__main__.py rename to third_party/python/rpycdec/src/rpycdec/__main__.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/apk.py b/third_party/python/rpycdec/src/rpycdec/apk.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/apk.py rename to third_party/python/rpycdec/src/rpycdec/apk.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/cli.py b/third_party/python/rpycdec/src/rpycdec/cli.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/cli.py rename to third_party/python/rpycdec/src/rpycdec/cli.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/decompile.py b/third_party/python/rpycdec/src/rpycdec/decompile.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/decompile.py rename to third_party/python/rpycdec/src/rpycdec/decompile.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/rpa.py b/third_party/python/rpycdec/src/rpycdec/rpa.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/rpa.py rename to third_party/python/rpycdec/src/rpycdec/rpa.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/safe_pickle.py b/third_party/python/rpycdec/src/rpycdec/safe_pickle.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/safe_pickle.py rename to third_party/python/rpycdec/src/rpycdec/safe_pickle.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/save.py b/third_party/python/rpycdec/src/rpycdec/save.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/save.py rename to third_party/python/rpycdec/src/rpycdec/save.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/stmts.py b/third_party/python/rpycdec/src/rpycdec/stmts.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/stmts.py rename to third_party/python/rpycdec/src/rpycdec/stmts.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/translate.py b/third_party/python/rpycdec/src/rpycdec/translate.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/translate.py rename to third_party/python/rpycdec/src/rpycdec/translate.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/utils.py b/third_party/python/rpycdec/src/rpycdec/utils.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/rpycdec/utils.py rename to third_party/python/rpycdec/src/rpycdec/utils.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/store/__init__.py b/third_party/python/rpycdec/src/store/__init__.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/store/__init__.py rename to third_party/python/rpycdec/src/store/__init__.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/src/store/layeredimage.py b/third_party/python/rpycdec/src/store/layeredimage.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/src/store/layeredimage.py rename to third_party/python/rpycdec/src/store/layeredimage.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/tests/.gitignore b/third_party/python/rpycdec/tests/.gitignore similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/tests/.gitignore rename to third_party/python/rpycdec/tests/.gitignore diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/tests/test_ast.py b/third_party/python/rpycdec/tests/test_ast.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/tests/test_ast.py rename to third_party/python/rpycdec/tests/test_ast.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/tests/test_rpa.py b/third_party/python/rpycdec/tests/test_rpa.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/tests/test_rpa.py rename to third_party/python/rpycdec/tests/test_rpa.py diff --git a/third_party/python/rpycdec-0.1.13+489e9c6/tests/test_translate.py b/third_party/python/rpycdec/tests/test_translate.py similarity index 100% rename from third_party/python/rpycdec-0.1.13+489e9c6/tests/test_translate.py rename to third_party/python/rpycdec/tests/test_translate.py