##// END OF EJS Templates
packaging: explain why we purge while building wheels...
marmoute -
r53152:074bc2b1 stable
parent child Browse files
Show More
@@ -1,44 +1,48 b''
1 1 #!/bin/bash
2 2
3 3 # Intended to run within docker using image:
4 4 #
5 5 # registry.heptapod.net/mercurial/ci-images/core-wheel-x86_64-c:v3.0
6 6 #
7 7 # we might want to factor most of this with the associated mercurial-core CI
8 8 # definition. (i.e. move this script into a place where the CI can directly call it for its purpose)
9 9
10 10 set -e -x
11 11
12 12 PYTHON_TARGETS="cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp311 cp312-cp312 cp313-cp313"
13 13
14 14 export MERCURIAL_SETUP_FORCE_TRANSLATIONS=1
15 15
16 16 # We need to copy the repository to ensure:
17 17 # (1) we don't wrongly write roots files in the repository (or any other wrong
18 18 # users)
19 19 # (2) we don't reuse pre-compiled extension built outside for manylinux and
20 20 # therefor not compatible.
21 21 cp -r /src/ /tmp/src/
22 22 cd /tmp/src/
23 hg purge --all --no-confirm
23 # clear potentially cached artifact from the host
24 # (we could narrow this purge probably)
25 hg purge \
26 --ignored \
27 --no-confirm
24 28
25 29 export HGRCPATH=/tmp/build-config.rc
26 30 cat << EOF > $HGRCPATH
27 31 [trusted]
28 32 users=*
29 33 groups=*
30 34 EOF
31 35
32 36 for py in $PYTHON_TARGETS; do
33 37 echo 'build wheel for' $py
34 38 # cleanup any previous wheel
35 39 tmp_wd="/tmp/wheels/$py/repaired"
36 40 rm -rf $tmp_wd
37 41 mkdir -p $tmp_wd
38 42 # build a new wheel
39 43 contrib/build-one-linux-wheel.sh $py $tmp_wd
40 44 # fix the owner back to the repository owner
41 45 chown `stat /src/ -c %u:%g` $tmp_wd/*.whl
42 46 mv $tmp_wd/*.whl /src/dist
43 47 done
44 48
General Comments 0
You need to be logged in to leave comments. Login now