File: install_python_osx.sh

package info (click to toggle)
azure-uamqp-python 1.6.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 35,564 kB
  • sloc: ansic: 184,383; cpp: 7,738; python: 7,731; cs: 5,767; sh: 983; xml: 298; makefile: 34
file content (24 lines) | stat: -rw-r--r-- 671 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
#!/bin/bash

# Python 3.5 is only built for OSX 10.6+
PACKAGE_TYPE="macosx10.9"
if [[ "$PYTHONVERSION" =~ ^3.5 ]]; then
  PACKAGE_TYPE="macosx10.6"
fi
if [[ "$PYTHONVERSION" =~ ^3.10 ]]; then
  PACKAGE_TYPE="macos11"
fi
if [[ "$PYTHONVERSION" =~ ^3.11 ]]; then
  PACKAGE_TYPE="macos11"
fi


# Handle prerelease versions
PACKAGE_DIR="$PYTHONVERSION"
if [[ "$PYTHONVERSION" =~ ^([0-9.]+)[A-Za-z] ]]; then
  PACKAGE_DIR="${BASH_REMATCH[1]}"
fi

curl -sSO https://www.python.org/ftp/python/$PACKAGE_DIR/python-$PYTHONVERSION-$PACKAGE_TYPE.pkg
sudo installer -allowUntrusted -pkg python-$PYTHONVERSION-$PACKAGE_TYPE.pkg -target /
rm -f python-$PYTHONVERSION-$PACKAGE_TYPE.pkg