]> arthur.barton.de Git - bup.git/blob - dev/prep-for-macos-build
Update base_version to 0.34~ for 0.34 development
[bup.git] / dev / prep-for-macos-build
1 #!/usr/bin/env bash
2
3 set -exu
4
5 usage()
6 {
7     echo "Usage: prep-for-macos-build [python3]"
8 }
9
10 pyver="${1:-python3}"
11
12 if ! command -v brew; then
13     /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
14 fi
15
16 brew install par2 readline rsync pkg-config md5sha1sum
17
18 # This avoid's macos interference, i.e. without this it looks like we
19 # won't actually be able to use the readline we just installed above.
20 brew link --force readline
21 # "brew unlink readline" will undo this hack
22
23 case "$pyver" in
24     python3)
25         brew install python
26         pip3 install --user pytest pytest-xdist
27         ;;
28     *)
29         usage 1>&2
30         exit 2
31         ;;
32 esac