1
1
#! /bin/bash
2
2
# -*- indent-tabs-mode: nil; tab-width: 2; sh-indentation: 2; -*-
3
3
4
- # Test that when resolving a pre-built wheel the -- wheel- server-url is
4
+ # Test that when resolving a pre-built wheel the local wheel server is
5
5
# given preference over PyPI.org.
6
6
7
7
SCRIPTDIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
@@ -21,8 +21,6 @@ fromager \
21
21
--work-dir=" $INIT /work-dir" \
22
22
bootstrap " ${DIST} ==${VERSION} "
23
23
24
- start_local_wheel_server " $INIT /wheels-repo"
25
-
26
24
# Modify the wheel so we can identify it as coming from the right
27
25
# server.
28
26
cd " $OUTDIR "
@@ -36,9 +34,6 @@ rm "$filename"
36
34
zip -r " $filename " flit_core*
37
35
cp " $filename " " $INIT /wheels-repo/downloads"
38
36
39
- # Make sure the mirror is up to date
40
- pypi-mirror create -d " $INIT /wheels-repo/downloads/" -m " $INIT /wheels-repo/simple/"
41
-
42
37
TESTDIR=" $OUTDIR /test"
43
38
mkdir -p " $TESTDIR "
44
39
cd " $TESTDIR "
54
49
# the local server.
55
50
fromager \
56
51
-v \
57
- --wheel-server-url " $WHEEL_SERVER_URL " \
58
52
--settings-dir=" $TESTDIR /overrides/settings" \
53
+ --sdists-repo=" $INIT /sdists-repo" \
54
+ --wheels-repo=" $INIT /wheels-repo" \
55
+ --work-dir=" $INIT /work-dir" \
59
56
bootstrap " ${DIST} ==${VERSION} " " wheel==0.43.0"
60
57
61
58
# Ensure we have both expected wheels
@@ -66,15 +63,15 @@ wheels-repo/downloads/wheel-0.43.0-0-py3-none-any.whl
66
63
67
64
pass=true
68
65
for f in $EXPECTED_FILES ; do
69
- if [ ! -f " $f " ]; then
70
- echo " FAIL: Did not find $OUTDIR /$f " 1>&2
66
+ if [ ! -f " $INIT / $ f" ]; then
67
+ echo " FAIL: Did not find $INIT /$f " 1>&2
71
68
pass=false
72
69
fi
73
70
done
74
71
75
72
# Ensure we got the right copy of the wheel for flit_core, with the
76
73
# modified license file.
77
- cd wheels-repo/prebuilt
74
+ cd $INIT / wheels-repo/prebuilt
78
75
unzip " $filename "
79
76
cat flit_core* .dist-info/LICENSE
80
77
if ! grep -q " Test was here" flit_core* .dist-info/LICENSE; then
0 commit comments