File: prep-for-macos-build

package info (click to toggle)
bup 0.33.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,720 kB
  • sloc: python: 15,905; sh: 5,799; ansic: 2,965; pascal: 669; makefile: 21
file content (33 lines) | stat: -rwxr-xr-x 742 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/env bash

set -exu

usage()
{
    echo "Usage: prep-for-macos-build [python3]"
}

pyver="${1:-python3}"

if ! command -v brew; then
    /usr/bin/env \
        bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi

brew install par2 readline rsync pkg-config md5sha1sum

# This avoid's macos interference, i.e. without this it looks like we
# won't actually be able to use the readline we just installed above.
brew link --force readline
# "brew unlink readline" will undo this hack

case "$pyver" in
    python3)
        brew install python
        python3 -m pip install --break-system-packages --user pytest pytest-xdist
        ;;
    *)
        usage 1>&2
        exit 2
        ;;
esac