File: before_install.sh

package info (click to toggle)
python-hug 2.6.0-2.4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,072 kB
  • sloc: python: 8,938; sh: 99; makefile: 17
file content (32 lines) | stat: -rwxr-xr-x 767 bytes parent folder | download
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
 #! /bin/bash

echo $TRAVIS_OS_NAME

 if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then

    # Travis has an old version of pyenv by default, upgrade it
    brew update > /dev/null 2>&1
    brew outdated pyenv || brew upgrade pyenv

    pyenv --version

    # Find the latest requested version of python
    case "$TOXENV" in
        py34)
            python_minor=4;;
        py35)
            python_minor=5;;
        py36)
            python_minor=6;;
        py36-marshmallow2)
            python_minor=6;;
        py36-marshmallow3)
            python_minor=6;;
        py37)
            python_minor=7;;
    esac
    latest_version=`pyenv install --list | grep -e "^[ ]*3\.$python_minor" | tail -1`

    pyenv install $latest_version
    pyenv local $latest_version
fi