@@ -7,80 +7,86 @@ SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
77source " $SCRIPTDIR /common.sh"
88pass=true
99
10+ DIST=setuptools
11+ VER=78.1.0
12+
13+ # ###############################################################################
1014# run fromager once to build wheels that can be used by a local wheel server
15+
1116fromager \
17+ --debug \
1218 --log-file=" $OUTDIR /bootstrap.log" \
1319 --error-log-file=" $OUTDIR /fromager-errors.log" \
1420 --sdists-repo=" $OUTDIR /sdists-repo" \
1521 --wheels-repo=" $OUTDIR /wheels-repo" \
1622 --work-dir=" $OUTDIR /work-dir" \
1723 --settings-dir=" $SCRIPTDIR /changelog_settings" \
18- bootstrap ' setuptools '
24+ bootstrap " $DIST == $VER "
1925
20- start_local_wheel_server
21- rm -rf " $OUTDIR /sdists-repo"
26+ # ###############################################################################
27+ # run fromager again to verify that we pick up the existing wheels in the output directory
28+
29+ # Remove build work-dir and wheel server dir, but not the sdist or wheel repos
2230rm -rf " $OUTDIR /work-dir"
31+ rm -rf " $OUTDIR /wheels-repo/simple"
2332rm " $OUTDIR /bootstrap.log"
2433
25-
26- # run fromager with the cache wheel server pointing to the local wheel server
2734fromager \
35+ --debug \
2836 --log-file=" $OUTDIR /bootstrap.log" \
2937 --error-log-file=" $OUTDIR /fromager-errors.log" \
3038 --sdists-repo=" $OUTDIR /sdists-repo" \
3139 --wheels-repo=" $OUTDIR /wheels-repo" \
3240 --work-dir=" $OUTDIR /work-dir" \
3341 --settings-dir=" $SCRIPTDIR /changelog_settings" \
34- --no-cleanup \
35- bootstrap --cache-wheel-server-url=$WHEEL_SERVER_URL ' setuptools'
42+ bootstrap --cache-wheel-server-url=" https://pypi.org/simple" " $DIST ==$VER "
3643
3744EXPECTED_LOG_MESSAGES=(
38- " setuptools: loading build sdist dependencies from build-sdist-requirements.txt"
39- " setuptools: loading build backend dependencies from build-backend-requirements.txt"
40- " setuptools: loading build system dependencies from build-system-requirements.txt"
45+ " $DIST : looking for existing wheel for version $VER with build tag () in"
46+ " $DIST : found existing wheel"
4147)
42-
4348for pattern in " ${EXPECTED_LOG_MESSAGES[@]} " ; do
44- echo $pattern
4549 if ! grep -q " $pattern " " $OUTDIR /bootstrap.log" ; then
4650 echo " FAIL: Did not find log message $pattern in $OUTDIR /bootstrap.log" 1>&2
4751 pass=false
4852 fi
4953done
54+ $pass
5055
51- EXPECTED_FILES="
52- $OUTDIR /wheels-repo/downloads/setuptools-*.whl
53-
54- $OUTDIR /work-dir/setuptools-*/*-requirements.txt
55-
56- $OUTDIR /work-dir/build-order.json
57- $OUTDIR /work-dir/constraints.txt
58- "
56+ UNEXPECTED_LOG_MESSAGES=(
57+ " $DIST : checking if wheel was already uploaded to https://pypi.org/simple"
58+ )
5959
60- for pattern in $EXPECTED_FILES ; do
61- if [ ! -f " ${ pattern} " ] ; then
62- echo " Did not find $pattern " 1>&2
60+ for pattern in " ${UNEXPECTED_LOG_MESSAGES[@]} " ; do
61+ if grep -q " $pattern " " $OUTDIR /bootstrap.log " ; then
62+ echo " FAIL: Found log message $pattern in $OUTDIR /bootstrap.log " 1>&2
6363 pass=false
6464 fi
6565done
66-
6766$pass
6867
68+ # ###############################################################################
69+
70+ # run fromager with the cache wheel server pointing to the pypi server and
71+ # verify we can pick it up from there
72+
73+ start_local_wheel_server
6974rm -rf " $OUTDIR /sdists-repo"
7075rm -rf " $OUTDIR /work-dir"
71- rm -rf " $OUTDIR /wheels-repo"
76+ rm -rf " $OUTDIR /wheels-repo/build"
77+ rm -rf " $OUTDIR /wheels-repo/download"
7278rm " $OUTDIR /bootstrap.log"
7379
74- # run fromager with the cache wheel server pointing to the pypi server
7580fromager \
81+ --debug \
7682 --log-file=" $OUTDIR /bootstrap.log" \
7783 --error-log-file=" $OUTDIR /fromager-errors.log" \
7884 --sdists-repo=" $OUTDIR /sdists-repo" \
7985 --wheels-repo=" $OUTDIR /wheels-repo" \
8086 --work-dir=" $OUTDIR /work-dir" \
8187 --settings-dir=" $SCRIPTDIR /changelog_settings" \
8288 --no-cleanup \
83- bootstrap --cache-wheel-server-url=" https://pypi.org/simple" ' setuptools '
89+ bootstrap --cache-wheel-server-url=" https://pypi.org/simple" " $DIST == $VER "
8490
8591EXPECTED_FILES="
8692$OUTDIR /wheels-repo/downloads/setuptools-*.whl
98104
99105$pass
100106
101- for pattern in " ${EXPECTED_LOG_MESSAGES[@]} " ; do
107+ UNEXPECTED_LOG_MESSAGES=(
108+ " $DIST : loading build sdist dependencies from build-sdist-requirements.txt"
109+ " $DIST : loading build backend dependencies from build-backend-requirements.txt"
110+ " $DIST : loading build system dependencies from build-system-requirements.txt"
111+ )
112+
113+ for pattern in " ${UNEXPECTED_LOG_MESSAGES[@]} " ; do
102114 echo $pattern
103115 if grep -q " $pattern " " $OUTDIR /bootstrap.log" ; then
104116 echo " FAIL: found log message $pattern in $OUTDIR /bootstrap.log" 1>&2
0 commit comments