Skip to content

Commit 1567a33

Browse files
committed
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
1 parent 99c0370 commit 1567a33

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

examples/draft/install.sh

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,19 @@
22

33
# example script for installing libzmq and pyzmq with draft support
44

5-
# 1. install libzmq with draft enabled
6-
ZMQ_VERSION=4.3.4
7-
PREFIX=${PREFIX:-/usr/local}
8-
PYZMQ=${PYZMQ:-pyzmq}
9-
CPU_COUNT=${CPU_COUNT:-$(python3 -c "import os; print(os.cpu_count())")}
5+
# tell pyzmq to build bundled libzmq with cmake
6+
# (alternately, install and build libzmq with drafts enabled)
7+
export ZMQ_PREFIX=bundled
108

11-
set -ex
12-
echo "installing libzmq to $PREFIX"
13-
wget https://github.com/zeromq/libzmq/releases/download/v${ZMQ_VERSION}/zeromq-${ZMQ_VERSION}.tar.gz -O libzmq.tar.gz
14-
tar -xzf libzmq.tar.gz
15-
cd zeromq-${ZMQ_VERSION}
16-
./configure --prefix=${PREFIX} --enable-drafts
17-
make -j${CPU_COUNT} && make install
9+
# tell pyzmq to build libzmq with draft support
10+
export ZMQ_DRAFT_API=1
1811

19-
# install pyzmq with drafts enabled
12+
# install pyzmq
2013
# By specifying ``--no-binary pyzmq``, pip knows to not install wheels, and will compile pyzmq from source.
14+
# --no-cache prevents installing a previously cached local build of pyzmq
2115

22-
echo "installing ${PYZMQ}"
23-
export ZMQ_PREFIX=${PREFIX}
24-
export ZMQ_DRAFT_API=1
25-
26-
pip install -v --no-binary pyzmq --pre ${PYZMQ}
16+
echo "installing pyzmq"
17+
pip install -v --no-cache --no-binary pyzmq pyzmq
2718

2819
cat << END | python3
2920
import sys

0 commit comments

Comments
 (0)