Skip to content

Commit

Permalink
Merge pull request #239 from bluescarni/pr/more_py27
Browse files Browse the repository at this point in the history
Enable py27m build for manylinux
  • Loading branch information
bluescarni authored Dec 30, 2018
2 parents 64d6e85 + 276c138 commit c46ef72
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions doc/sphinx/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Changelog
New
~~~

- Enable the ``py27m`` build variant for the manylinux packages (`#239 <https://github.com/esa/pagmo2/pull/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 <https://pypi.org/project/dill/>`__
(`#229 <https://github.com/esa/pagmo2/pull/229>`__).
Expand Down
27 changes: 21 additions & 6 deletions tools/install_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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-`
Expand Down

0 comments on commit c46ef72

Please sign in to comment.