Commit 5d9f5605 authored by mattip's avatar mattip
Browse files

support manylinux_2_24

parent 03950c9a
...@@ -20,13 +20,19 @@ matrix: ...@@ -20,13 +20,19 @@ matrix:
dist: xenial dist: xenial
env: env:
- TEST_BUILDS=1 - TEST_BUILDS=1
# 64-bit builds, manylinux2010 # 64-bit builds,
- os: linux - os: linux
dist: xenial dist: xenial
env: env:
- TEST_BUILDS=1 - TEST_BUILDS=1
- MB_ML_VER=2010 - MB_ML_VER=2010
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT} - DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
- os: linux
dist: xenial
env:
- TEST_BUILDS=1
- MB_ML_VER=_2_24
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
# 32-bit builds # 32-bit builds
- os: linux - os: linux
dist: xenial dist: xenial
......
...@@ -41,7 +41,8 @@ The Travis CI scripts are designed to build *and test*: ...@@ -41,7 +41,8 @@ The Travis CI scripts are designed to build *and test*:
* 64-bit macOS wheels built for macOS 10.9+ * 64-bit macOS wheels built for macOS 10.9+
* 64/32-bit macOS wheels built for macOS 10.6+ * 64/32-bit macOS wheels built for macOS 10.6+
* 64-bit ``manylinuxX_x86_64`` wheels, both narrow and wide Unicode builds, where `X` is any valid Manylinux version, such as `1`, or `2010` * 64-bit ``manylinuxX_x86_64`` wheels, both narrow and wide Unicode builds,
where `X` is any valid Manylinux version, such as `1`, or `2010`
* 32-bit ``manylinuxX_i686`` wheels, both narrow and wide Unicode builds * 32-bit ``manylinuxX_i686`` wheels, both narrow and wide Unicode builds
You can currently build and test against Pythons 2.7, 3.5, 3.6, 3.7, 3.8 and 3.9 You can currently build and test against Pythons 2.7, 3.5, 3.6, 3.7, 3.8 and 3.9
...@@ -55,7 +56,7 @@ The AppVeyor setup is designed to build *and test*: ...@@ -55,7 +56,7 @@ The AppVeyor setup is designed to build *and test*:
* 64-bit Windows ``win_amd64`` wheels * 64-bit Windows ``win_amd64`` wheels
* 32-bit Windows ``win32`` wheels * 32-bit Windows ``win32`` wheels
You can currently build and test against Pythons 2.7, 3.5, 3.6, 3.7, 3.8 You can currently build and test against Pythons 2.7, 3.5, 3.6, 3.7, 3.8, 3.9
***************** *****************
How does it work? How does it work?
...@@ -91,19 +92,35 @@ shell scripts listed above are available for your build and test. ...@@ -91,19 +92,35 @@ shell scripts listed above are available for your build and test.
Build options are controlled mainly by the following environment Build options are controlled mainly by the following environment
variables: variables:
* ``MB_PYTHON_VER`` sets the Python version targetted: ``major.minor.patch`` for CPython, or ``pypy-major.minor`` for PyPy. * ``MB_PYTHON_VER`` sets the Python version targetted: ``major.minor.patch``
* ``MB_PYTHON_OSX_VER`` sets the minimum macOS SDK version for any C extensions. For CPython targets it may be set to 10.6 or 10.9, provided a corresponding Python build is available at `python.org <https://www.python.org/downloads/mac-osx/>`_. It defaults to the highest version available. It's ignored for PyPy targets. for CPython, or ``pypy-major.minor`` for PyPy.
* ``PLAT`` sets the architectures built for any C extensions: ``x86_64`` or ``intel`` for 64-bit or 64/32-bit respectively. It defaults to the same arches as the target Python version: 64-bit for CPython macOS 10.9 or PyPy, and 64/32-bit for CPython 10.6. * ``MB_PYTHON_OSX_VER`` sets the minimum macOS SDK version for any C
extensions. For CPython targets it may be set to 10.6 or 10.9, provided a
In most cases it's best to rely on the defaults for ``MB_PYTHON_OSX_VER`` and ``PLAT``, rather than setting them explicitly. Examples of exceptions to this guideline include: corresponding Python build is available at `python.org
<https://www.python.org/downloads/mac-osx/>`_. It defaults to the highest
* setting ``MB_PYTHON_OSX_VER=10.6`` to build a 10.6 64/32-bit CPython wheel for Python 2.7 (default for 2.7 is 10.9 64-bit) version available. It's ignored for PyPy targets.
* setting ``MB_PYTHON_OSX_VER=10.6 and PLAT=x86_64`` to build a 10.6 64-bit only wheel (10.6 would normally be 64/32-bit). Such a wheel would still have a platform tag of ``macosx_10_6_intel`` , advertising support for both 64 and 32-bit, but wouldnt work in 32-bit mode. This may be OK given how unlikely it is that there is still anyone actually running Python on macOS in 32-bit mode. * ``PLAT`` sets the architectures built for any C extensions: ``x86_64`` or
``intel`` for 64-bit or 64/32-bit respectively. It defaults to the same
arches as the target Python version: 64-bit for CPython macOS 10.9 or PyPy,
and 64/32-bit for CPython 10.6.
In most cases it's best to rely on the defaults for ``MB_PYTHON_OSX_VER`` and
``PLAT``, rather than setting them explicitly. Examples of exceptions to this
guideline include:
* setting ``MB_PYTHON_OSX_VER=10.6`` to build a 10.6 64/32-bit CPython wheel
for Python 2.7 (default for 2.7 is 10.9 64-bit)
* setting ``MB_PYTHON_OSX_VER=10.6 and PLAT=x86_64`` to build a 10.6 64-bit
only wheel (10.6 would normally be 64/32-bit). Such a wheel would still have
a platform tag of ``macosx_10_6_intel`` , advertising support for both 64 and
32-bit, but wouldnt work in 32-bit mode. This may be OK given how unlikely it
is that there is still anyone actually running Python on macOS in 32-bit
mode.
The ``build_wheel`` function builds the wheel, and ``install_run`` The ``build_wheel`` function builds the wheel, and ``install_run``
function installs and tests it. Look in ``multibuild/common_utils.sh`` for function installs and tests it. Look in ``multibuild/common_utils.sh`` for
default definitions of these functions. See below for more details, many of which are common default definitions of these functions. See below for more details, many of
to macOS and Linux. which are common to macOS and Linux.
Manylinux Manylinux
========= =========
...@@ -122,6 +139,7 @@ variable. The default version is ``1``. Versions that are currently valid are: ...@@ -122,6 +139,7 @@ variable. The default version is ``1``. Versions that are currently valid are:
* ``2010`` corresponding to manylinux2010 (see `PEP 571 <https://www.python.org/dev/peps/pep-0571>`_). * ``2010`` corresponding to manylinux2010 (see `PEP 571 <https://www.python.org/dev/peps/pep-0571>`_).
* ``2014`` corresponding to manylinux2014 and adds more architectures to ``PLAT`` * ``2014`` corresponding to manylinux2014 and adds more architectures to ``PLAT``
(see `PEP 599 <https://www.python.org/dev/peps/pep-0599>`_). (see `PEP 599 <https://www.python.org/dev/peps/pep-0599>`_).
* ``_2_24`` corresponding to manylinux_2_24 (see `PEP 600 <https://www.python.org/dev/peps/pep-0600>`_).
The environment variable specified which Manylinux docker container you are building in. The environment variable specified which Manylinux docker container you are building in.
......
...@@ -24,7 +24,13 @@ GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py ...@@ -24,7 +24,13 @@ GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
# with, so it is passed in when calling "docker run" for tests. # with, so it is passed in when calling "docker run" for tests.
UNICODE_WIDTH=${UNICODE_WIDTH:-32} UNICODE_WIDTH=${UNICODE_WIDTH:-32}
if [ $(uname) == "Darwin" ]; then IS_MACOS=1; IS_OSX=1; fi if [ $(uname) == "Darwin" ]; then
IS_MACOS=1; IS_OSX=1;
else
# In the manylinux_2_24 image, based on Debian9, python2 is not installed
which python || export PATH=/opt/python/cp39-cp39/bin:$PATH
fi
# Work round bug in travis xcode image described at # Work round bug in travis xcode image described at
# https://github.com/direnv/direnv/issues/210 # https://github.com/direnv/direnv/issues/210
......
#!/bin/bash #!/bin/bash
# Useful utilities common across manylinux1 builds # Useful utilities common across manylinux builds
MULTIBUILD_DIR=$(dirname "${BASH_SOURCE[0]}") MULTIBUILD_DIR=$(dirname "${BASH_SOURCE[0]}")
source $MULTIBUILD_DIR/common_utils.sh source $MULTIBUILD_DIR/common_utils.sh
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment