summaryrefslogtreecommitdiff
path: root/fetch-win32-wheels
blob: 439b0a2c84c13302bf8c13be314b02567a00aa49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
#
#  Fetch the Win32 wheels from Appveyor
#
if [ $# -lt 1 ]; then
    echo "usage: fetch-win32-wheels <netifaces-version> [tag]"
    exit 1;
fi

if [ $# -ge 2 ]; then
    maybetag="tag=$2&"
else
    maybetag=
fi

niversion=$1
artifact_url="https://ci.appveyor.com/api/projects/al45tair/netifaces/artifacts"
win32_versions="27 34 35 36 37 38"
amd64_versions="27 36 37 38"

for version in $win32_versions; do
    maybe_m=
    if [ $version -lt 38 ]; then
	maybe_m=m
    fi
    wheel=netifaces-$niversion-cp$version-cp${version}${maybe_m}-win32.whl
    url="$artifact_url/dist/$wheel?${maybetag}job=Environment:%20PYTHON=C:\\Python$version"
    echo -n "$wheel..."
    if curl -s -L -o wheelhouse/$wheel $url; then
	echo "ok"
    else
	echo "failed"
	exit 1
    fi
done

for version in $amd64_versions; do
    maybe_m=
    if [ $version -lt 38 ]; then
	maybe_m=m
    fi
    wheel=netifaces-$niversion-cp$version-cp${version}${maybe_m}-win_amd64.whl
    url="$artifact_url/dist/$wheel?${maybetag}job=Environment:%20PYTHON=C:\\Python$version-x64"
    echo -n "$wheel..."
    if curl -s -L -o wheelhouse/$wheel $url; then
	echo "ok"
    else
	echo "failed"
	exit 1
    fi
done