From 1581974ca677c2c7873152c4c42cb50e704c790d Mon Sep 17 00:00:00 2001 From: Noa <coolreader18@gmail.com> Date: Mon, 20 Mar 2023 15:02:37 -0500 Subject: [PATCH] Switch rustpython to toml recipe --- recipes/rustpython/recipe.sh | 10 ---------- recipes/rustpython/recipe.toml | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+), 10 deletions(-) delete mode 100644 recipes/rustpython/recipe.sh create mode 100644 recipes/rustpython/recipe.toml diff --git a/recipes/rustpython/recipe.sh b/recipes/rustpython/recipe.sh deleted file mode 100644 index cdaa6787c..000000000 --- a/recipes/rustpython/recipe.sh +++ /dev/null @@ -1,10 +0,0 @@ -GIT=https://github.com/RustPython/RustPython -BRANCH=redox-release -CARGOFLAGS=--no-default-features -export BUILDTIME_RUSTPYTHONPATH=/lib/rustpython/ - -function recipe_stage() { - dest="$(realpath "$1")" - mkdir -pv "$dest/lib/" - cp -r Lib "$dest/lib/rustpython" -} diff --git a/recipes/rustpython/recipe.toml b/recipes/rustpython/recipe.toml new file mode 100644 index 000000000..54f2f753c --- /dev/null +++ b/recipes/rustpython/recipe.toml @@ -0,0 +1,22 @@ +[source] +git = "https://github.com/RustPython/RustPython" +branch = "redox-release" + +[build] +dependencies = ["openssl", "zlib"] +template = "custom" +script = """ +(cd "${COOKBOOK_SOURCE}" && bash scripts/redox/uncomment-cargo.sh) +export BUILDTIME_RUSTPYTHONPATH=/lib/rustpython +export OPENSSL_DIR="${COOKBOOK_SYSROOT}" +export ZLIB_STATIC=1 +COOKBOOK_CARGO_FLAGS+=(--features ssl) +cookbook_cargo +mkdir -p "${COOKBOOK_STAGE}/lib" +rsync -aE \ + --exclude 'test/' \ + --exclude '__pycache__/' \ + --exclude '*.pyc' \ + --exclude '/README.md' \ + "${COOKBOOK_SOURCE}"/Lib/ "${COOKBOOK_STAGE}/lib/rustpython" +""" -- GitLab