-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfigure.sh
More file actions
executable file
·37 lines (26 loc) · 840 Bytes
/
configure.sh
File metadata and controls
executable file
·37 lines (26 loc) · 840 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
#!/usr/bin/env bash
# get script dir
script_dir=$( cd `dirname ${BASH_SOURCE[0]}` >/dev/null 2>&1 ; pwd -P )
pushd $script_dir > /dev/null
echo "Python ..."
# Do not install Python if in Anaconda environment or we are on Docker container
if [[ -z "$CONDA_DEFAULT_ENV" && ! -f /.dockerenv ]]
then
# install Python 3.12.0 if not installed
pyenv install 3.12.0 --skip-existing
pyenv versions
# use Python 3 from .python-version for local development
eval "$(pyenv init -)"
fi
# create virtual environment
python3 -m venv .venv
# activate virtual environment
source .venv/bin/activate
# upgrade pip
pip install --upgrade wheel
pip install --upgrade pip
# install development and runtime packages
pip install -r requirements-dev.txt
# install package itself (from pyproject.toml)
pip install -e .
popd > /dev/null