Skip to content

Commit 64d85e8

Browse files
committed
fix OSX binary wheels
1 parent 35fc8a4 commit 64d85e8

3 files changed

Lines changed: 63 additions & 3 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ venv/bin/delocate-wheel: venv/
8282
venv/bin/pip install delocate
8383

8484
delocate: venv/bin/delocate-wheel
85-
venv/bin/delocate-wheel dist/*.whl
85+
venv/bin/delocate-wheel -v dist/*.whl
8686

8787
venv/bin/twine: venv/
8888
venv/bin/pip install twine
8989

9090
twine: venv/bin/twine
91-
venv/bin/twine upload dist/*.whl
91+
venv/bin/twine upload dist/*.whl

osx_wheel.sh

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/usr/bin/env bash -ve
2+
#
3+
# Use this to make binary wheels for OSX
4+
#
5+
#
6+
# this script uses homebrew, install with:
7+
#
8+
# $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
9+
#
10+
#
11+
# then install some requirements:
12+
#
13+
# $ brew install cmake bison openssl pyenv readline bzip2
14+
#
15+
16+
# some settings and variables
17+
PYTHONS=(3.6.10 3.7.7 3.8.3 3.9.0b3) # pypy3.6-7.3.1
18+
BRANCH=oscar
19+
HERE="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
20+
BUILD=${HERE}/build
21+
SRC=${BUILD}/MonetDB-${BRANCH}
22+
PREFIX=${BUILD}/monetdb
23+
24+
# make sure the pythons are installed
25+
for p in ${PYTHONS[@]}; do
26+
pyenv install -s ${p}
27+
done
28+
29+
# prepare for monetdb build
30+
mkdir -p ${BUILD}
31+
cd ${BUILD}
32+
33+
# download and install monetdb
34+
if [ ! -f ${BRANCH}.tar.bz2 ]; then
35+
curl -O -C - https://dev.monetdb.org/hg/MonetDB/archive/${BRANCH}.tar.bz2
36+
fi
37+
38+
if [ ! -d ${SRC} ]; then
39+
tar jxvf ${BRANCH}.tar.bz2
40+
fi
41+
42+
mkdir -p ${SRC}/build
43+
cd ${SRC}/build
44+
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
45+
rm -rf ${PREFIX}
46+
make -j5 install
47+
48+
# set some flags to find the monetdb libs
49+
export CFLAGS="-I${PREFIX}/include -L${PREFIX}/lib"
50+
export DYLD_LIBRARY_PATH=${PREFIX}/lib
51+
52+
cd ${HERE}
53+
54+
for p in ${PYTHONS[@]}; do
55+
~/.pyenv/versions/${p}/bin/pip install wheel
56+
~/.pyenv/versions/${p}/bin/python setup.py bdist_wheel
57+
done
58+
59+
~/.pyenv/versions/${PYTHONS[0]}/bin/pip install delocate
60+
DYLD_LIBRARY_PATH=${PREFIX}/lib/ ~/.pyenv/versions/${PYTHONS[0]}/bin/delocate-wheel -v dist/*.whl

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
setuptools.setup(
1515
name="monetdbe",
16-
version="0.8.3",
16+
version="0.8.4",
1717
author="Gijs Molenaar",
1818
author_email="gijs@pythonic.nl",
1919
description="MonetDBe - the Python embedded MonetDB",

0 commit comments

Comments
 (0)