2017-05-27 21:35:48 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
cat << EOF > "/usr/bin/nproc"
|
|
|
|
#!/bin/bash
|
2017-08-21 17:49:35 -07:00
|
|
|
echo 10
|
2017-05-27 21:35:48 -07:00
|
|
|
EOF
|
|
|
|
chmod +x /usr/bin/nproc
|
|
|
|
|
2017-09-10 13:41:16 -07:00
|
|
|
# Remove this old Python 2.4.3 executable, and make the "python2" command find
|
|
|
|
# a newer version of Python. We need this for autogenerating some files for the
|
|
|
|
# UI.
|
|
|
|
rm -f /usr/bin/python2
|
|
|
|
ln -s /opt/python/cp27-cp27m/bin/python2 /usr/bin/python2
|
|
|
|
|
2017-05-27 21:35:48 -07:00
|
|
|
mkdir .whl
|
2018-10-18 17:58:39 -07:00
|
|
|
for PYTHON in cp27-cp27mu cp34-cp34m cp35-cp35m cp36-cp36m cp37-cp37m; do
|
2017-05-27 21:35:48 -07:00
|
|
|
# The -f flag is passed twice to also run git clean in the arrow subdirectory.
|
|
|
|
# The -d flag removes directories. The -x flag ignores the .gitignore file,
|
|
|
|
# and the -e flag ensures that we don't remove the .whl directory.
|
|
|
|
git clean -f -f -x -d -e .whl
|
|
|
|
pushd python
|
|
|
|
# Fix the numpy version because this will be the oldest numpy version we can
|
|
|
|
# support.
|
2018-03-13 22:18:08 -07:00
|
|
|
/opt/python/${PYTHON}/bin/pip install -q numpy==1.10.4 cython==0.27.3
|
2017-09-10 13:41:16 -07:00
|
|
|
INCLUDE_UI=1 PATH=/opt/python/${PYTHON}/bin:$PATH /opt/python/${PYTHON}/bin/python setup.py bdist_wheel
|
2017-05-27 21:35:48 -07:00
|
|
|
# In the future, run auditwheel here.
|
|
|
|
mv dist/*.whl ../.whl/
|
|
|
|
popd
|
|
|
|
done
|
2017-06-02 13:20:34 -07:00
|
|
|
|
|
|
|
# Rename the wheels so that they can be uploaded to PyPI. TODO(rkn): This is a
|
|
|
|
# hack, we should use auditwheel instead.
|
|
|
|
pushd .whl
|
|
|
|
find *.whl -exec bash -c 'mv $1 ${1//linux/manylinux1}' bash {} \;
|
|
|
|
popd
|