Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update draft install script #2018

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading