-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdotfiles_install_tools_python.sh
More file actions
53 lines (48 loc) · 986 Bytes
/
dotfiles_install_tools_python.sh
File metadata and controls
53 lines (48 loc) · 986 Bytes
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Script to set up Python environment
# Copyright (C) 2021 Upperstream Software.
# Provided under the ISC License. See LICENSE.txt file for details.
python_describe_module() {
cat <<-EOF
python:
install Python programming language development tools
EOF
}
install_python_package() {
pip3 install $1
}
install_python3() {
case "$os" in
FreeBSD)
install_package python3
;;
Linux)
case $distribution in
Arch)
linux_install_package python
;;
*)
linux_install_package python3
;;
esac
;;
NetBSD)
install_package python3.7
;;
OpenBSD)
install_package python--%3.8
;;
*)
install_package python3
;;
esac
}
install_tools_python() {
cat <<-EOF
-----------------------------------------
Installing tools for Python
-----------------------------------------
EOF
has git || install git || report_error
has python3 || install_python3 || report_error
has pep8 || install_python_package pep8 || report_error
}