-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
Copy pathcreate_venv.sh
executable file
·38 lines (29 loc) · 1022 Bytes
/
create_venv.sh
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
#!/bin/bash
############################################################################
#
# Install editable phidata in a virtual environment
# Usage:
# ./scripts/dev_setup.sh
#
############################################################################
CURR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(dirname "${CURR_DIR}")"
VENV_DIR="${REPO_ROOT}/phienv"
PYTHON_VERSION=$(python3 --version)
source "${CURR_DIR}/_utils.sh"
main() {
print_heading "Phidata dev setup"
print_heading "Creating venv: ${VENV_DIR}"
print_info "Python version: ${PYTHON_VERSION}"
print_info "Removing existing venv: ${VENV_DIR}"
rm -rf "${VENV_DIR}"
print_info "Creating python3 venv: ${VENV_DIR}"
python3 -m venv "${VENV_DIR}"
print_info "Installing base python packages"
pip3 install --upgrade pip pip-tools twine build
# Install workspace
source "${VENV_DIR}/bin/activate"
source "${CURR_DIR}/install.sh"
print_heading "Activate using: source ${VENV_DIR}/bin/activate"
}
main "$@"