Skip to content

Commit

Permalink
Adding Python3.7 wheels support (ray-project#2546)
Browse files Browse the repository at this point in the history
* Adding Python3.7 wheels support

* Adding Mac wheels update

* fix

* numpy version

* choose different numpy versions depending on python version

* fix
  • Loading branch information
devin-petersohn authored and pcmoritz committed Oct 19, 2018
1 parent 653c5b1 commit 8fcdafc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
8 changes: 5 additions & 3 deletions .travis/test-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]}
Expand Down
18 changes: 14 additions & 4 deletions python/build-wheel-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/build-wheel-manylinux1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8fcdafc

Please sign in to comment.