redox/recipes/dev/rustpython/recipe.toml
Josh Megnauth 968fb22b8c
Fix RustPython compilation
The head of the repository compiles whereas the branch doesn't anymore.
DYNAMIC_INIT is needed because of a linking error when the dependencies
are dynamically compiled.
2025-05-21 21:13:01 -04:00

26 lines
592 B
TOML

[source]
git = "https://github.com/RustPython/RustPython"
[build]
dependencies = [
"openssl1",
"zlib",
]
template = "custom"
script = """
DYNAMIC_INIT
(cd "${COOKBOOK_SOURCE}" && bash scripts/redox/uncomment-cargo.sh && cargo update)
export BUILDTIME_RUSTPYTHONPATH=/lib/rustpython
export OPENSSL_DIR="${COOKBOOK_SYSROOT}"
export ZLIB_STATIC=1
cookbook_cargo --features ssl
mkdir -p "${COOKBOOK_STAGE}/lib"
rsync -aE \
--exclude 'test/' \
--exclude '__pycache__/' \
--exclude '*.pyc' \
--exclude '/README.md' \
"${COOKBOOK_SOURCE}"/Lib/ "${COOKBOOK_STAGE}/lib/rustpython"
"""