Skip to content
Snippets Groups Projects
Commit 911344f8 authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

trying pex building

parent 0168f830
No related branches found
No related tags found
2 merge requests!1452Merge 2.8.2 to main,!1396changes for local builds
......@@ -17,10 +17,23 @@ pexes='[
{"name":"ws_metrics", "version":"2.8.2rc1"}
]'
BUILD_DIR=/lustre/aoc/cluster/pipeline/${CAPO_PROFILE}/workspaces/sbin
[[ -d $BUILD_DIR ]] || mkdir -p "$BUILD_DIR"
for row in $(echo "${pexes}" | jq -r '.[] | @base64'); do
_jq() {
echo ${row} | base64 --decode | jq -r ${1}
echo "${row}" | base64 --decode | jq -r "${1}"
}
curl --header "PRIVATE-TOKEN: glpat-vPamXXk4PZPe8GQAzmY2" "https://gitlab.nrao.edu/api/v4/projects/621/packages/generic/$(_jq '.name')/$(_jq '.version')/$(_jq '.name')-$(_jq '.version')-py3-none-any.whl" --output "$(_jq '.name')-$(_jq '.version')-py3-none-any.whl"
pip3 install "$(_jq '.name')-$(_jq '.version')-py3-none-any.whl"
curl --header "PRIVATE-TOKEN: glpat-vPamXXk4PZPe8GQAzmY2" "https://gitlab.nrao.edu/api/v4/projects/621/packages/generic/$(_jq '.name')/$(_jq '.version')/$(_jq '.name')-$(_jq '.version').tar.gz" --output "$(_jq '.name')-$(_jq '.version').tar.gz"
tar -zxf "$(_jq '.name')-$(_jq '.version').tar.gz"
cd "$(_jq '.name')-$(_jq '.version')" || return
if [ -e pyproject.toml ]; then
until pex . -c "$(_jq '.name')" -o "$BUILD_DIR/$(_jq '.name')" --python-shebang /home/ssa/bin/python3.10 ; do
echo "PEX build failed. Retrying."; sleep 2;
done
else
echo "PEX build impossible in $PWD because there is no pyproject.toml file"
fi
cd ..
# pip3 install "$(_jq '.name')-$(_jq '.version')-py3-none-any.whl"
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment