diff --git a/README.rst b/README.rst index c0ff7048..f772daaf 100644 --- a/README.rst +++ b/README.rst @@ -58,7 +58,7 @@ directory for source code. The images currently contain: -- CPython 2.7, 3.4, 3.5 and 3.6, installed in +- CPython 2.7, 3.4, 3.5, 3.6 and 3.7, installed in ``/opt/python/-``. The directories are named after the PEP 425 tags for each environment -- e.g. ``/opt/python/cp27-cp27mu`` contains a wide-unicode CPython 2.7 @@ -99,16 +99,18 @@ $ PLATFORM=$(uname -m) TRAVIS_COMMIT=latest ./build.sh Example ------- + An example project which builds 32- and 64-bit wheels for each Python interpreter version can be found here: https://github.com/pypa/python-manylinux-demo. This demonstrates how to use these docker images in conjunction with auditwheel to build manylinux-compatible wheels using the free `travis ci `_ -continuous integration service. +continuous integration service. -(NB: for the 32-bit images running on a 64-bit host machine, it's necessary to run +(NB: for the 32-bit images running on a 64-bit host machine, it's necessary to run everything under the command line program `linux32`, which changes reported architecture -in new program environment. See `this example invocation `_) +in new program environment. See `this example invocation +`_) The PEP itself -------------- diff --git a/docker/build_scripts/build.sh b/docker/build_scripts/build.sh old mode 100644 new mode 100755 index e254bd65..219703ac --- a/docker/build_scripts/build.sh +++ b/docker/build_scripts/build.sh @@ -11,7 +11,7 @@ MY_DIR=$(dirname "${BASH_SOURCE[0]}") # Dependencies for compiling Python that we want to remove from # the final image after compiling Python # GPG installed to verify signatures on Python source tarballs. -PYTHON_COMPILE_DEPS="zlib-devel bzip2-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel gpg" +PYTHON_COMPILE_DEPS="zlib-devel bzip2-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel gpg libffi-devel" # Libraries that are allowed as part of the manylinux1 profile MANYLINUX1_DEPS="glibc-devel libstdc++-devel glib2-devel libX11-devel libXext-devel libXrender-devel mesa-libGL-devel libICE-devel libSM-devel ncurses-devel" diff --git a/docker/build_scripts/build_env.sh b/docker/build_scripts/build_env.sh index c4784c91..4cc15b98 100644 --- a/docker/build_scripts/build_env.sh +++ b/docker/build_scripts/build_env.sh @@ -1,7 +1,7 @@ # source me PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python -CPYTHON_VERSIONS="2.7.15 3.4.8 3.5.5 3.6.5" +CPYTHON_VERSIONS="2.7.15 3.4.8 3.5.5 3.6.5 3.7.0rc1" # openssl version to build, with expected sha256 hash of .tar.gz # archive. diff --git a/docker/build_scripts/build_utils.sh b/docker/build_scripts/build_utils.sh index 379fefc7..a1f06adb 100755 --- a/docker/build_scripts/build_utils.sh +++ b/docker/build_scripts/build_utils.sh @@ -19,6 +19,15 @@ function lex_pyver { } +function pyver_dist_dir { + # Echoes the dist directory name of given pyver, removing alpha/beta prerelease + # Thus: + # 3.2.1 -> 3.2.1 + # 3.7.0b4 -> 3.7.0 + echo $1 | awk -F "." '{printf "%d.%d.%d", $1, $2, $3}' +} + + function do_cpython_build { local py_ver=$1 check_var $py_ver @@ -64,8 +73,9 @@ function build_cpython { local py_ver=$1 check_var $py_ver check_var $PYTHON_DOWNLOAD_URL - curl -fsSLO $PYTHON_DOWNLOAD_URL/$py_ver/Python-$py_ver.tgz - curl -fsSLO $PYTHON_DOWNLOAD_URL/$py_ver/Python-$py_ver.tgz.asc + local py_dist_dir=$(pyver_dist_dir $py_ver) + curl -fsSLO $PYTHON_DOWNLOAD_URL/$py_dist_dir/Python-$py_ver.tgz + curl -fsSLO $PYTHON_DOWNLOAD_URL/$py_dist_dir/Python-$py_ver.tgz.asc gpg --verify Python-$py_ver.tgz.asc if [ $(lex_pyver $py_ver) -lt $(lex_pyver 3.3) ]; then do_cpython_build $py_ver ucs2