##// END OF EJS Templates
packaging: add make target for linux wheels...
Boris Feld -
r32080:fcddcf44 stable
parent child Browse files
Show More
@@ -0,0 +1,34 b''
1 #!/bin/bash
2 # This file is directly inspired by
3 # https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh
4 set -e -x
5
6 PYTHON_TARGETS=$(ls -d /opt/python/cp2*/bin)
7
8 # Create an user for the tests
9 useradd hgbuilder
10
11 # Bypass uid/gid problems
12 cp -R /src /io && chown -R hgbuilder:hgbuilder /io
13
14 # Compile wheels for Python 2.X
15 for PYBIN in $PYTHON_TARGETS; do
16 "${PYBIN}/pip" wheel /io/ -w wheelhouse/
17 done
18
19 # Bundle external shared libraries into the wheels with
20 # auditwheel (https://github.com/pypa/auditwheel) repair.
21 # It also fix the ABI tag on the wheel making it pip installable.
22 for whl in wheelhouse/*.whl; do
23 auditwheel repair "$whl" -w /src/wheelhouse/
24 done
25
26 # Install packages and run the tests for all Python versions
27 cd /io/tests/
28
29 for PYBIN in $PYTHON_TARGETS; do
30 # Install mercurial wheel as root
31 "${PYBIN}/pip" install mercurial --no-index -f /src/wheelhouse
32 # But run tests as hgbuilder user (non-root)
33 su hgbuilder -c "\"${PYBIN}/python\" /io/tests/run-tests.py --with-hg=\"${PYBIN}/hg\" --blacklist=/io/contrib/linux-wheel-centos5-blacklist"
34 done
@@ -0,0 +1,3 b''
1 test-convert-git.t
2 test-subrepo-git.t
3 test-patchbomb-tls.t
@@ -62,6 +62,9 b' mercurial/mpatch.py'
62 mercurial/osutil.py
62 mercurial/osutil.py
63 mercurial/parsers.py
63 mercurial/parsers.py
64
64
65 # Generated wheels
66 wheelhouse/
67
65 syntax: regexp
68 syntax: regexp
66 ^\.pc/
69 ^\.pc/
67 ^\.(pydev)?project
70 ^\.(pydev)?project
@@ -270,6 +270,14 b' docker-centos7:'
270 mkdir -p packages/centos7
270 mkdir -p packages/centos7
271 contrib/dockerrpm centos7
271 contrib/dockerrpm centos7
272
272
273 linux-wheels: linux-wheels-x86_64 linux-wheels-i686
274
275 linux-wheels-x86_64:
276 docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`:/src quay.io/pypa/manylinux1_x86_64 /src/contrib/build-linux-wheels.sh
277
278 linux-wheels-i686:
279 docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`:/src quay.io/pypa/manylinux1_i686 linux32 /src/contrib/build-linux-wheels.sh
280
273 .PHONY: help all local build doc cleanbutpackages clean install install-bin \
281 .PHONY: help all local build doc cleanbutpackages clean install install-bin \
274 install-doc install-home install-home-bin install-home-doc \
282 install-doc install-home install-home-bin install-home-doc \
275 dist dist-notests check tests check-code update-pot \
283 dist dist-notests check tests check-code update-pot \
@@ -278,4 +286,5 b' docker-centos7:'
278 docker-ubuntu-xenial docker-ubuntu-xenial-ppa \
286 docker-ubuntu-xenial docker-ubuntu-xenial-ppa \
279 docker-ubuntu-yakkety docker-ubuntu-yakkety-ppa \
287 docker-ubuntu-yakkety docker-ubuntu-yakkety-ppa \
280 fedora20 docker-fedora20 fedora21 docker-fedora21 \
288 fedora20 docker-fedora20 fedora21 docker-fedora21 \
281 centos5 docker-centos5 centos6 docker-centos6 centos7 docker-centos7
289 centos5 docker-centos5 centos6 docker-centos6 centos7 docker-centos7 \
290 linux-wheels
General Comments 0
You need to be logged in to leave comments. Login now