]> arthur.barton.de Git - bup.git/blob - dev/prep-for-debianish-build
tests: partially convert to pytest
[bup.git] / dev / prep-for-debianish-build
1 #!/usr/bin/env bash
2
3 set -exuo pipefail
4
5 usage()
6 {
7     echo "Usage: prep-for-debianish-build [python2|python3] [pyxattr|xattr]"
8 }
9
10 export DEBIAN_FRONTEND=noninteractive
11 apt-get update
12
13 common_debs='gcc make linux-libc-dev git rsync eatmydata acl attr par2'
14 common_debs="$common_debs duplicity rdiff-backup rsnapshot dosfstools kmod"
15 common_debs="$common_debs pkg-config libreadline-dev libacl1-dev"
16
17 pyver="${1:-python2}"
18 xattr="${2:-pyxattr}"
19
20 # dosfstools: for vfat for the (root) tests
21
22 case "$pyver" in
23     python2)
24         apt-get install -y \
25                 $common_debs \
26                 python2.7-dev python-fuse \
27                 python-"$xattr" python-tornado python-pytest
28         ;;
29     python3)
30         apt-get install -y \
31                 $common_debs \
32                 python3-dev python3-distutils python3-fuse \
33                 python3-"$xattr" python3-tornado python3-pytest
34         ;;
35     *)
36         usage 1>&2
37         exit 2
38         ;;
39 esac