From bbff74c8696421575b7090ee4ff3fb5b43bb4da0 Mon Sep 17 00:00:00 2001 From: Alecks Gates Date: Sat, 15 Jun 2024 15:25:48 -0500 Subject: [PATCH] Adapt to rust changes in upstream schemas --- .gitmodules | 2 +- build.py | 6 +++++- copy-schema-files.sh | 9 ++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitmodules b/.gitmodules index a309886..8a942ba 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "podping-schemas"] path = podping-schemas url = https://github.com/Podcastindex-org/podping-schemas.git - tag = v2024.05.17.034306 + tag = v2024.06.14.033937 diff --git a/build.py b/build.py index 769e2e7..f6e5009 100644 --- a/build.py +++ b/build.py @@ -34,7 +34,11 @@ def ext_modules(self, v): self._d["ext_modules"] = v -capnpy_schema_files = glob.glob("podping_schemas/**/*.capnp", recursive=True) +capnpy_schema_files = [ + p for p in + glob.glob("podping_schemas/**/*.capnp", recursive=True) + if not p.endswith("rust.capnp") +] json_schema_files = glob.glob("podping_schemas/**/*.json", recursive=True) diff --git a/copy-schema-files.sh b/copy-schema-files.sh index 7514578..6572690 100755 --- a/copy-schema-files.sh +++ b/copy-schema-files.sh @@ -5,15 +5,10 @@ package_path="podping_schemas" mkdir -p "${package_path}" -readarray -d '' paths_to_copy < <(find "${submodule_path}/schema/" -mindepth 1 -maxdepth 1 -print0) - -for path in "${paths_to_copy[@]}" -do - cp -r "${path}" "${package_path}" -done +rsync -ra "${submodule_path}/schema/" "${package_path}/" # Make capnpy imports use to this module -find "${package_path}" -name '*.capnp' -exec sed -i -e 's/\/schema\//\/podping_schemas\//g' {} \; +find "${package_path}" -name '*.capnp' -type f -exec sed -i -E 's/\/schema\//\/podping_schemas\//g' {} \; readarray -d '' module_directories < <(find "${package_path}" -type d -not \( -path "*/__pycache__" \) -print0)