#!/bin/bash DEST=${1:-/etc/skel} USER=astral-sh PROJECT=ruff git_url="https://github.com/${USER}/${PROJECT}" VERSION=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/tags?per_page=5" | jq -r '.[0] | .name') RSS_FEED="https://github.com/${USER}/${PROJECT}/releases.atom" # xdg-open ${RSS_FEED} echo ${RSS_FEED} # the dependencies for the python package # sudo apt-get install python3-tifffile python3-sklearn # sudo apt-get -f install # the dependencies for py2dsp sudo apt install -y pristine-tar pypi2deb python3-maturin # if the build fails with 'unrecognized build system: pybuild' add # export PYBUILD_SYSTEM=distutils # to the debian/rules file. # mkdir -p ${DEST}/.cargo cat <<-EOF | tee -a ${DEST}/.cargo/config.toml [env] RUSTC_BOOTSTRAP = "1" [unstable] sparse-registry = true [registries.crates-io] protocol = "sparse" # protocol = "git" [net] git-fetch-with-cli = true EOF BUILD_HOME="/var/tmp/build_${PROJECT}-${VERSION#v}" mkdir -p "${BUILD_HOME}" pushd "${BUILD_HOME}" || exit sudo -H py2dsp --profile dpt --distribution unstable --revision 1 --github "${git_url}" # strace -o /tmp/strace_output.txt py2dsp --profile dpt --distribution unstable --revision 1 --github "${git_url}" # # Add rust to the venv conda install conda-forge::rust pushd "${BUILD_HOME}/result/${PROJECT}-${VERSION#v}" cat <