-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.sh
executable file
·33 lines (29 loc) · 950 Bytes
/
install.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
#!/usr/bin/env bash
PYVER=3.9.9
VIRTUALENV=e4990a
if ! command -v brew &> /dev/null
then
echo "Please install Homebrew: https://brew.sh"
exit 1
fi
if ! brew list pyenv &> /dev/null ||
! brew list pyenv-virtualenv &> /dev/null
then
echo "Please install pyenv and pyenv-virtualenv using Homebrew:"
echo "$ brew install pyenv pyenv-virtualenv"
exit 1
fi
# The Python version installed in pyenv must be built with
# shared lib support PyInstaller.
PYTHON_CONFIGURE_OPTS="--enable-shared"
if [ -z $(pyenv versions --bare | grep "^$PYVER$") ]; then
env PYTHON_CONFIGURE_OPTS="$PYTHON_CONFIGURE_OPTS" pyenv install $PYVER
fi
if [ -z $(pyenv versions --bare | grep "^$VIRTUALENV$") ]; then
pyenv virtualenv $PYVER $VIRTUALENV
fi
eval "$(pyenv init -)" && pyenv shell $VIRTUALENV
pip install -U pip setuptools wheel
pip install -Ur requirements.txt
pip install -Ur requirements-dev.txt
python -m markdown -x extra README.md > README.html