add pkg_setup to webbump
This commit is contained in:
parent
0d359c9665
commit
90342fd0c3
@ -24,3 +24,18 @@ src_install() {
|
||||
|
||||
find "${ED}/etc/webbump/" -type f -exec chmod 0755 {} +
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
local venv_dir="/var/lib/webbump/venv"
|
||||
|
||||
if [[ ! -d "$venv_dir" ]]; then
|
||||
einfo "Creating Python virtualenv at $venv_dir"
|
||||
python3 -m venv "$venv_dir"
|
||||
|
||||
einfo "Installing dependencies into venv"
|
||||
"$venv_dir/bin/pip" install --upgrade pip
|
||||
"$venv_dir/bin/pip" install flask
|
||||
else
|
||||
einfo "Virtualenv already exists at $venv_dir"
|
||||
fi
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user