@@ -54,44 +54,61 @@ OPENSSL_VERSION=1.0.2h
5454CURL_VERSION=7.49.0
5555RUST_CHANNEL=nightly
5656
57- # Clean build files
58- clean_project
57+ # It doesn't matter with which Python version we build the wheel, so we
58+ # use the oldest supported one
59+ if [[ $1 == " osx" ]]; then
60+ brew update
61+ brew install python2.7 mmv
62+ install_rust $RUST_CHANNEL
63+ pip wheel /io/ -w /io/wheelhouse
64+ mmv " /io/wheelhouse/rust_fst-*-cp*-none-macosx*.whl" \
65+ " /io/wheelhouse/rust_fst-#1-py2.py3-none-macosx#3.whl"
66+ pip install -v rust_fst --no-index -f /io/wheelhouse
67+ pip install pytest
68+ cd /
69+ py.test /io/tests
70+ else
71+ PYBIN=/opt/python/cp27-cp27m/bin
72+ # Clean build files
73+ clean_project
5974
60- install_openssl $OPENSSL_VERSION
61- install_curl $CURL_VERSION
62- install_rust $RUST_CHANNEL
75+ install_openssl $OPENSSL_VERSION
76+ install_curl $CURL_VERSION
77+ install_rust $RUST_CHANNEL
6378
64- # Remove old wheels
65- rm -rf /io/wheelhouse/* || echo " No old wheels to delete"
79+ # Remove old wheels
80+ rm -rf /io/wheelhouse/* || echo " No old wheels to delete"
6681
67- # We don't support Python 2.6
68- rm -rf /opt/python/cp26*
82+ # We don't support Python 2.6
83+ rm -rf /opt/python/cp26*
6984
70- # Install libraries needed for compiling the extension
71- yum -q -y install libffi-devel
85+ # Install libraries needed for compiling the extension
86+ yum -q -y install libffi-devel mmv
7287
73- # Compile wheels
74- for PYBIN in /opt/python/* /bin; do
88+ # Compile wheel
7589 ${PYBIN} /python -m pip wheel /io/ -w /wheelhouse/
76- clean_project
77- done
78-
79- # Move pure wheels to output wheelhouse
80- mkdir -p /io/wheelhouse/
81- mv /wheelhouse/* any.whl /io/wheelhouse/ || echo " No pure wheels found."
8290
83- # Bundle external shared libraries into the wheels
84- for whl in /wheelhouse/* .whl; do
85- auditwheel repair $whl -w /io/wheelhouse/
86- done
87-
88- # Set permissions on wheels
89- chmod -R a+rw /io/wheelhouse
90-
91- # Install packages and test
92- for PYBIN in /opt/python/* /bin/; do
93- ${PYBIN} /python -m pip install pytest
94- ${PYBIN} /python -m pip install rust_fst --no-index -f /io/wheelhouse
95- ${PYBIN} /python -m pytest --verbose /io/tests
96- clean_project
97- done
91+ # Move pure wheels to target directory
92+ mv /wheelhouse/* any.whl /io/wheelhouse || echo " No pure wheels to move"
93+
94+ # Bundle external shared libraries into the wheel
95+ for whl in /wheelhouse/* .whl; do
96+ cp $whl /io/wheelhouse/
97+ auditwheel repair $whl -w /io/wheelhouse/
98+ done
99+
100+ # Rename wheels to match all Python versions
101+ mmv " /io/wheelhouse/rust_fst-*-cp*-cp*-manylinux1_*.whl" \
102+ " /io/wheelhouse/rust_fst-#1-py2.py3-none-manylinux1_#4.whl"
103+
104+ # Set permissions on wheels
105+ chmod -R a+rw /io/wheelhouse
106+
107+ # Install packages and test with all Python versions
108+ for PYBIN in /opt/python/* /bin/; do
109+ ${PYBIN} /python -m pip install pytest cffi
110+ ${PYBIN} /python -m pip install rust_fst --no-index -f /io/wheelhouse
111+ ${PYBIN} /python -m pytest --verbose /io/tests
112+ clean_project
113+ done
114+ fi
0 commit comments