##// END OF EJS Templates
packaging: add `HG_DOCKER_OWN_USER` to `dockerdeb` like exists in `dockerrpm`...
packaging: add `HG_DOCKER_OWN_USER` to `dockerdeb` like exists in `dockerrpm` I was getting build failures when it was trying to write to the working directory on CentOS 7 without this. It is basically the same as was added to the RPM builder in 4c0d4bbdc395. For some reason, this doesn't work with Xenial, and the only solution I found was to invoke it with UID 1000 on the host side. It doesn't EOL until April 2024, but it also has python 3.5.2, so this build complication is the least of the problems with supporting it after py2 is dropped. Differential Revision: https://phab.mercurial-scm.org/D9394

File last commit:

r38031:6f5b4cee default
r46580:f6a1540d default
Show More
build-linux-wheels.sh
34 lines | 1.1 KiB | application/x-sh | BashLexer
/ contrib / packaging / build-linux-wheels.sh
Gregory Szorc
packaging: move build-linux-wheels.sh to contrib/packaging/...
r38030 #!/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)
Gregory Szorc
packaging: move linux-wheel-centos5-blacklist to contrib/packaging/...
r38031 su hgbuilder -c "\"${PYBIN}/python\" /io/tests/run-tests.py --with-hg=\"${PYBIN}/hg\" --blacklist=/io/contrib/packaging/linux-wheel-centos5-blacklist"
Gregory Szorc
packaging: move build-linux-wheels.sh to contrib/packaging/...
r38030 done