Skip to content

Commit

Permalink
Merge pull request #2018 from minrk/update-draft-install
Browse files Browse the repository at this point in the history
Update draft install script
  • Loading branch information
minrk authored Aug 19, 2024
2 parents 9b2e1e1 + 5090bd4 commit 5213dba
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions examples/draft/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5213dba

Please sign in to comment.