From 4670feb3d6a10de46e912d885ed5338c1e2b3eff Mon Sep 17 00:00:00 2001 From: Christopher Berner Date: Sat, 25 Nov 2023 10:45:23 -0800 Subject: [PATCH] Fix Python package publishing script --- Makefile | 2 +- py_publish.sh | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index b819667..e975c88 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ release_py: pre .PHONY: publish_py publish_py: test_py docker pull quay.io/pypa/manylinux2014_x86_64 - docker run -it --rm -v $(shell pwd):/raptorq quay.io/pypa/manylinux2014_x86_64 /raptorq/py_publish.sh + docker run -it --rm -v $(shell pwd):/raptorq-ro:ro quay.io/pypa/manylinux2014_x86_64 /raptorq-ro/py_publish.sh .PHONY: install_py install_py: pre diff --git a/py_publish.sh b/py_publish.sh index f741bdb..3e5c130 100755 --- a/py_publish.sh +++ b/py_publish.sh @@ -1,13 +1,18 @@ #!/bin/bash +PYTHON3=/opt/python/cp311-cp311/bin/python3 + +cp -r /raptorq-ro /raptorq cd /raptorq -yum install -y python3-pip -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.60.0 + +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=$(cat ./rust-toolchain) source $HOME/.cargo/env -pip3 install toml -pip3 install maturin +cd /tmp +$PYTHON3 -m venv venv +cd /raptorq +source /tmp/venv/bin/activate +python3 -m pip install --upgrade pip +python3 -m pip install 'maturin>=1.0,<2.0' -# xargs is just to merge the lines together into a single line -maturin publish --cargo-extra-args="--features python" \ - -i $(ls -1 /opt/python/*/bin/python3 | xargs | sed 's/ / -i /g') +python3 -m maturin publish