Skip to content

Commit

Permalink
I think mac will work now
Browse files Browse the repository at this point in the history
  • Loading branch information
tgsmith61591 committed Jul 29, 2017
1 parent 4e99383 commit 663f4e5
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 19 deletions.
27 changes: 15 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ matrix:

# This environment tests the same conditions as above, but tests against MAC OS X,
# using virtualenv instead of the conda python distribution
#- os: osx
# language: generic
# env: DISTRIB="virtualenv" PYTHON_VERSION="2.7" CYTHON_VERSION="0.23.5"
# COVERAGE=true SCIKIT_LEARN_VERSION="0.17.1" DEPLOY=true CACHEC=false
- os: osx
language: generic
env: DISTRIB="virtualenv" PYTHON_VERSION="2.7" CYTHON_VERSION="0.23.5"
COVERAGE=true SCIKIT_LEARN_VERSION="0.17.1" DEPLOY=true CACHEC=false

# This environment tests Python 3.5 support on linux
- os: linux
Expand All @@ -49,16 +49,16 @@ matrix:
NUMPY_VERSION="1.12.1" SCIPY_VERSION="0.19.0" CYTHON_VERSION="0.25.2"
COVERAGE=true SCIKIT_LEARN_VERSION="0.18" STATSMODELS_VERSION="0.8"
DEPLOY=true CACHEC=true DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64"
DOCKER_CONTAINER_NAME="pyramidcontainer"
DOCKER_CONTAINER_NAME="pyramidcontainer" BUILD_TAR=true

# This environment tests Python 3.5 support on MAC OS X, using virtualenv
# instead of the conda python distribution
#- os: osx
# language: generic
# env: DISTRIB="virtualenv" PYTHON_VERSION="3.5"
# NUMPY_VERSION="1.12.1" SCIPY_VERSION="0.19.0" CYTHON_VERSION="0.25.2"
# COVERAGE=true SCIKIT_LEARN_VERSION="0.18" STATSMODELS_VERSION="0.8"
# DEPLOY=true CACHEC=false
- os: osx
language: generic
env: DISTRIB="virtualenv" PYTHON_VERSION="3.5"
NUMPY_VERSION="1.12.1" SCIPY_VERSION="0.19.0" CYTHON_VERSION="0.25.2"
COVERAGE=true SCIKIT_LEARN_VERSION="0.18" STATSMODELS_VERSION="0.8"
DEPLOY=true CACHEC=false

# This environment tests the newest supported Anaconda release (4.4.0) and
# runs on linux
Expand Down Expand Up @@ -98,7 +98,10 @@ notifications:

deploy:
#server: https://test.pypi.org/legacy/ # Upload to pypi test server
distributions: "bdist_wheel" # Upload .whl files only.
# script:
# - bash build_tools/travis/build_wheels.sh
# - ls dist/
# - python -m twine upload --skip-existing dist/*
skip_upload_docs: true
skip_cleanup: true # release artifacts as well
on:
Expand Down
30 changes: 23 additions & 7 deletions build_tools/travis/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,41 @@ if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
# homebrew, since it's ONLY for 64-bit distros and will not build a wheel
# with the 10_6 platform.
else
# depending on the python version, get a different one
# depending on the python version, get a different version pkg
if [[ "$PYTHON_VERSION" == "2.7" ]]; then
PYTHON_VERSION="2.7.13"
PYTHON_NAME="Python-${PYTHON_VERSION}-macosx10.6"
PYTHON_NAME="python-${PYTHON_VERSION}-macosx10.6"
else
PYTHON_VERSION="3.5.4"
PYTHON_NAME="Python-${PYTHON_VERSION}rc1-macosx10.6"
# 3.5.4 only ever had a release candidate, never a final, formal release
PYTHON_NAME="python-${PYTHON_VERSION}rc1-macosx10.6"
fi

# curl the URL
# curl the pkg from python.org
cd ${HOME}
curl https://www.python.org/ftp/python/${PYTHON_VERSION}/${PYTHON_NAME}.pkg > ${PYTHON_NAME}.pkg

# unpack
ls -la
# for some reason the installer complains about the package path being off?
test -f ${PYTHON_NAME}.pkg || echo "${PYTHON_NAME}.pkg does not exist"
echo "Changing permissions to 777"
sudo chmod 777 ${PYTHON_NAME}.pkg

# install using the installer (following is relevant documentation from `man installer`)
echo "Installing from pkg"
sudo installer -pkg ${PYTHON_NAME}.pkg -target /

# The installer command is used to install Mac OS X installer packages to a specified domain or volume.
# The installer command installs a single package per invocation, which is specified with the -package
# parameter ( -pkg is accepted as a synonym). It may be either a single package or a metapackage.
# In the case of the metapackage, the packages which are part of the default install will be installed
# unless disqualified by a package's check tool(s).
#
# The target volume is specified with the -target parameter ( -tgt is accepted as a synonym). It must already
# be mounted when the installer command is invoked.
#
# The installer command requires root privileges to run. If a package requires authentication (set in a
# package's .info file) the installer must be either run as root or with the sudo(8) command (but see further
# discussion under the -store option).
sudo installer -package ${PYTHON_NAME}.pkg -target /

# add python to the path
export PATH=/usr/bin/python:${PATH}
Expand Down
5 changes: 5 additions & 0 deletions build_tools/travis/build_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ elif [ "${TRAVIS_OS_NAME}" == "osx" ]; then
else
echo "Cannot build on ${TRAVIS_OS_NAME}."
fi

# only one env will have us build the tar file for src dist
if [[ "$BUILD_TAR" ]]; then
python setup.py sdist
fi

0 comments on commit 663f4e5

Please sign in to comment.