Skip to content

Commit

Permalink
Adapt to rust changes in upstream schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
agates committed Jun 15, 2024
1 parent 30a30ad commit bbff74c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -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
6 changes: 5 additions & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
9 changes: 2 additions & 7 deletions copy-schema-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit bbff74c

Please sign in to comment.