From 5090bd4b1d1729b55b39a9f7b66d590a5118b390 Mon Sep 17 00:00:00 2001 From: Min RK Date: Mon, 19 Aug 2024 08:56:14 +0200 Subject: [PATCH] update and simplify pyzmq draft example script - use bundled libzmq, now that we run a fully cmake build - use --no-cache to avoid installing previous local builds --- examples/draft/install.sh | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/examples/draft/install.sh b/examples/draft/install.sh index ceebd28c8..f50e75847 100644 --- a/examples/draft/install.sh +++ b/examples/draft/install.sh @@ -2,28 +2,19 @@ # example script for installing libzmq and pyzmq with draft support -# 1. install libzmq with draft enabled -ZMQ_VERSION=4.3.4 -PREFIX=${PREFIX:-/usr/local} -PYZMQ=${PYZMQ:-pyzmq} -CPU_COUNT=${CPU_COUNT:-$(python3 -c "import os; print(os.cpu_count())")} +# tell pyzmq to build bundled libzmq with cmake +# (alternately, install and build libzmq with drafts enabled) +export ZMQ_PREFIX=bundled -set -ex -echo "installing libzmq to $PREFIX" -wget https://github.com/zeromq/libzmq/releases/download/v${ZMQ_VERSION}/zeromq-${ZMQ_VERSION}.tar.gz -O libzmq.tar.gz -tar -xzf libzmq.tar.gz -cd zeromq-${ZMQ_VERSION} -./configure --prefix=${PREFIX} --enable-drafts -make -j${CPU_COUNT} && make install +# tell pyzmq to build libzmq with draft support +export ZMQ_DRAFT_API=1 -# install pyzmq with drafts enabled +# install pyzmq # By specifying ``--no-binary pyzmq``, pip knows to not install wheels, and will compile pyzmq from source. +# --no-cache prevents installing a previously cached local build of pyzmq -echo "installing ${PYZMQ}" -export ZMQ_PREFIX=${PREFIX} -export ZMQ_DRAFT_API=1 - -pip install -v --no-binary pyzmq --pre ${PYZMQ} +echo "installing pyzmq" +pip install -v --no-cache --no-binary pyzmq pyzmq cat << END | python3 import sys