Adding Python3.7 wheels support (#2546)

* Adding Python3.7 wheels support

* Adding Mac wheels update

* fix

* numpy version

* choose different numpy versions depending on python version

* fix
This commit is contained in:
Devin Petersohn 2018-10-18 17:58:39 -07:00 committed by Philipp Moritz
parent 653c5b114a
commit 8fcdafc6ea
3 changed files with 20 additions and 8 deletions

View file

@ -56,7 +56,7 @@ if [[ "$platform" == "linux" ]]; then
# Check that the other wheels are present.
NUMBER_OF_WHEELS=$(ls -1q $ROOT_DIR/../.whl/*.whl | wc -l)
if [[ "$NUMBER_OF_WHEELS" != "4" ]]; then
if [[ "$NUMBER_OF_WHEELS" != "5" ]]; then
echo "Wrong number of wheels found."
ls -l $ROOT_DIR/../.whl/
exit 1
@ -67,12 +67,14 @@ elif [[ "$platform" == "macosx" ]]; then
PY_MMS=("2.7"
"3.4"
"3.5"
"3.6")
"3.6"
"3.7")
# This array is just used to find the right wheel.
PY_WHEEL_VERSIONS=("27"
"34"
"35"
"36")
"36"
"37")
for ((i=0; i<${#PY_MMS[@]}; ++i)); do
PY_MM=${PY_MMS[i]}

View file

@ -16,15 +16,24 @@ DOWNLOAD_DIR=python_downloads
PY_VERSIONS=("2.7.13"
"3.4.4"
"3.5.3"
"3.6.1")
"3.6.1"
"3.7.0")
PY_INSTS=("python-2.7.13-macosx10.6.pkg"
"python-3.4.4-macosx10.6.pkg"
"python-3.5.3-macosx10.6.pkg"
"python-3.6.1-macosx10.6.pkg")
"python-3.6.1-macosx10.6.pkg"
"python-3.7.0-macosx10.6.pkg")
PY_MMS=("2.7"
"3.4"
"3.5"
"3.6")
"3.6"
"3.7")
# On python 3.7, a newer version of numpy seems to be necessary.
NUMPY_VERSIONS=("1.10.4"
"1.10.4"
"1.10.4"
"1.10.4"
"1.14.5")
mkdir -p $DOWNLOAD_DIR
mkdir -p .whl
@ -33,6 +42,7 @@ for ((i=0; i<${#PY_VERSIONS[@]}; ++i)); do
PY_VERSION=${PY_VERSIONS[i]}
PY_INST=${PY_INSTS[i]}
PY_MM=${PY_MMS[i]}
NUMPY_VERSION=${NUMPY_VERSIONS[i]}
# 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,
@ -60,7 +70,7 @@ for ((i=0; i<${#PY_VERSIONS[@]}; ++i)); do
$PIP_CMD install -q setuptools_scm==2.1.0
# Fix the numpy version because this will be the oldest numpy version we can
# support.
$PIP_CMD install -q numpy==1.10.4 cython==0.27.3
$PIP_CMD install -q numpy==$NUMPY_VERSION cython==0.27.3
# Install wheel to avoid the error "invalid command 'bdist_wheel'".
$PIP_CMD install -q wheel
# Add the correct Python to the path and build the wheel. This is only

View file

@ -13,7 +13,7 @@ rm -f /usr/bin/python2
ln -s /opt/python/cp27-cp27m/bin/python2 /usr/bin/python2
mkdir .whl
for PYTHON in cp27-cp27mu cp34-cp34m cp35-cp35m cp36-cp36m; do
for PYTHON in cp27-cp27mu cp34-cp34m cp35-cp35m cp36-cp36m cp37-cp37m; do
# 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.