Skip to content

Commit

Permalink
fix OSX binary wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
gijzelaerr committed Jul 9, 2020
1 parent 35fc8a4 commit 64d85e8
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ venv/bin/delocate-wheel: venv/
venv/bin/pip install delocate

delocate: venv/bin/delocate-wheel
venv/bin/delocate-wheel dist/*.whl
venv/bin/delocate-wheel -v dist/*.whl

venv/bin/twine: venv/
venv/bin/pip install twine

twine: venv/bin/twine
venv/bin/twine upload dist/*.whl
venv/bin/twine upload dist/*.whl
60 changes: 60 additions & 0 deletions osx_wheel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env bash -ve
#
# Use this to make binary wheels for OSX
#
#
# this script uses homebrew, install with:
#
# $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
#
#
# then install some requirements:
#
# $ brew install cmake bison openssl pyenv readline bzip2
#

# some settings and variables
PYTHONS=(3.6.10 3.7.7 3.8.3 3.9.0b3) # pypy3.6-7.3.1
BRANCH=oscar
HERE="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
BUILD=${HERE}/build
SRC=${BUILD}/MonetDB-${BRANCH}
PREFIX=${BUILD}/monetdb

# make sure the pythons are installed
for p in ${PYTHONS[@]}; do
pyenv install -s ${p}
done

# prepare for monetdb build
mkdir -p ${BUILD}
cd ${BUILD}

# download and install monetdb
if [ ! -f ${BRANCH}.tar.bz2 ]; then
curl -O -C - https://dev.monetdb.org/hg/MonetDB/archive/${BRANCH}.tar.bz2
fi

if [ ! -d ${SRC} ]; then
tar jxvf ${BRANCH}.tar.bz2
fi

mkdir -p ${SRC}/build
cd ${SRC}/build
cmake .. -DPY3INTEGRATION=OFF -DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison -DCMAKE_INSTALL_PREFIX=${PREFIX} -DINT128=ON -DWITH_CRYPTO=OFF -DCMAKE_BUILD_TYPE=Release -DASSERT=OFF
rm -rf ${PREFIX}
make -j5 install

# set some flags to find the monetdb libs
export CFLAGS="-I${PREFIX}/include -L${PREFIX}/lib"
export DYLD_LIBRARY_PATH=${PREFIX}/lib

cd ${HERE}

for p in ${PYTHONS[@]}; do
~/.pyenv/versions/${p}/bin/pip install wheel
~/.pyenv/versions/${p}/bin/python setup.py bdist_wheel
done

~/.pyenv/versions/${PYTHONS[0]}/bin/pip install delocate
DYLD_LIBRARY_PATH=${PREFIX}/lib/ ~/.pyenv/versions/${PYTHONS[0]}/bin/delocate-wheel -v dist/*.whl
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setuptools.setup(
name="monetdbe",
version="0.8.3",
version="0.8.4",
author="Gijs Molenaar",
author_email="gijs@pythonic.nl",
description="MonetDBe - the Python embedded MonetDB",
Expand Down

0 comments on commit 64d85e8

Please sign in to comment.