##// END OF EJS Templates
automation: support building Python 3 Inno installers...
automation: support building Python 3 Inno installers The core packaging code now supports building Python 3 installers using PyOxidizer. Let's teach the automation code to invoke it so that we produce both Python 2 and Python 3 based exe installers. When publishing the artifacts, the Python 3 versions are preferred over the Python 2 versions given their higher weight (10 versus 9). This may be a controversial change. But I think making Python 3 the default is warranted, as it is the future. The Python 2 installers are still fully supported and can be installed should issues with Python 3 arise. Differential Revision: https://phab.mercurial-scm.org/D8483

File last commit:

r38031:6f5b4cee default
r45278:802ee93c stable
Show More
build-linux-wheels.sh
34 lines | 1.1 KiB | application/x-sh | BashLexer
#!/bin/bash
# This file is directly inspired by
# https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh
set -e -x
PYTHON_TARGETS=$(ls -d /opt/python/cp27*/bin)
# Create an user for the tests
useradd hgbuilder
# Bypass uid/gid problems
cp -R /src /io && chown -R hgbuilder:hgbuilder /io
# Compile wheels for Python 2.X
for PYBIN in $PYTHON_TARGETS; do
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
done
# Bundle external shared libraries into the wheels with
# auditwheel (https://github.com/pypa/auditwheel) repair.
# It also fix the ABI tag on the wheel making it pip installable.
for whl in wheelhouse/*.whl; do
auditwheel repair "$whl" -w /src/wheelhouse/
done
# Install packages and run the tests for all Python versions
cd /io/tests/
for PYBIN in $PYTHON_TARGETS; do
# Install mercurial wheel as root
"${PYBIN}/pip" install mercurial --no-index -f /src/wheelhouse
# But run tests as hgbuilder user (non-root)
su hgbuilder -c "\"${PYBIN}/python\" /io/tests/run-tests.py --with-hg=\"${PYBIN}/hg\" --blacklist=/io/contrib/packaging/linux-wheel-centos5-blacklist"
done