diff --git a/.travis.yml b/.travis.yml index 65235616c..45c4cc154 100644 --- a/.travis.yml +++ b/.travis.yml @@ -120,7 +120,11 @@ matrix: - env: PAGMO_BUILD="OSXPython27" os: osx osx_image: xcode6.4 - - env: PAGMO_BUILD="manylinux64Py27" DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64" + - env: PAGMO_BUILD="manylinux64Py27m" DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64" + sudo: required + services: + - docker + - env: PAGMO_BUILD="manylinux64Py27mu" DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64" sudo: required services: - docker diff --git a/doc/sphinx/changelog.rst b/doc/sphinx/changelog.rst index bb054d3bd..9d50deba2 100644 --- a/doc/sphinx/changelog.rst +++ b/doc/sphinx/changelog.rst @@ -7,6 +7,8 @@ Changelog New ~~~ +- Enable the ``py27m`` build variant for the manylinux packages (`#239 `__). + - It is now possible to select a serialization backend other than cloudpickle. The other available backends are the standard :mod:`pickle` module and `dill `__ (`#229 `__). diff --git a/tools/install_docker.sh b/tools/install_docker.sh index f84a57f70..41b2d731d 100644 --- a/tools/install_docker.sh +++ b/tools/install_docker.sh @@ -17,8 +17,10 @@ elif [[ ${PAGMO_BUILD} == *36 ]]; then PYTHON_DIR="cp36-cp36m" elif [[ ${PAGMO_BUILD} == *35 ]]; then PYTHON_DIR="cp35-cp35m" -elif [[ ${PAGMO_BUILD} == *27 ]]; then +elif [[ ${PAGMO_BUILD} == *27mu ]]; then PYTHON_DIR="cp27-cp27mu" +elif [[ ${PAGMO_BUILD} == *27m ]]; then + PYTHON_DIR="cp27-cp27m" else echo "Invalid build type: ${PAGMO_BUILD}" exit 1 @@ -77,10 +79,17 @@ cd nlopt-${NLOPT_VERSION} make -j2 install > /dev/null cd .. -# Python deps -/opt/python/${PYTHON_DIR}/bin/pip install cloudpickle dill numpy ipyparallel -/opt/python/${PYTHON_DIR}/bin/ipcluster start --daemonize=True -sleep 20 +# Python mandatory deps. +/opt/python/${PYTHON_DIR}/bin/pip install cloudpickle numpy +# Python optional deps. +if [[ ${PAGMO_BUILD} != *27m ]]; then + # NOTE: do not install the optional deps for the py27m build: some of the deps + # don't have binary wheels available for py27m, which makes pip try to + # install them from source (which fails). + /opt/python/${PYTHON_DIR}/bin/pip install dill ipyparallel + /opt/python/${PYTHON_DIR}/bin/ipcluster start --daemonize=True + sleep 20 +fi # pagmo & pygmo cd /pagmo2 @@ -101,7 +110,13 @@ auditwheel repair dist/pygmo* -w ./dist2 # Try to install it and run the tests. cd / /opt/python/${PYTHON_DIR}/bin/pip install /pagmo2/build/wheel/dist2/pygmo* -/opt/python/${PYTHON_DIR}/bin/python -c "import pygmo; pygmo.test.run_test_suite(1)" +if [[ ${PAGMO_BUILD} == *27m ]]; then + # NOTE: for the py27m build we don't have ipyparallel installed, + # which will make some tests fail. Just try to import pygmo in this case. + /opt/python/${PYTHON_DIR}/bin/python -c "import pygmo" +else + /opt/python/${PYTHON_DIR}/bin/python -c "import pygmo; pygmo.test.run_test_suite(1)" +fi # Upload to pypi. This variable will contain something if this is a tagged build (vx.y.z), otherwise it will be empty. export PAGMO_RELEASE_VERSION=`echo "${TRAVIS_TAG}"|grep -E 'v[0-9]+\.[0-9]+.*'|cut -c 2-`