update for weasyprint
This commit is contained in:
parent
01c4a85bc0
commit
6ebce55be3
|
@ -595,7 +595,7 @@ def generate_chart(
|
|||
traces: Optional[Dict[str, Any]] = None,
|
||||
layout: Optional[Dict[str, Any]] = None,
|
||||
) -> str:
|
||||
### TODO figure out why plotly affects perf
|
||||
# TODO figure out why plotly affects perf
|
||||
import plotly.express as px
|
||||
|
||||
fig = getattr(px, type)(**options)
|
||||
|
|
17
install.sh
17
install.sh
|
@ -292,8 +292,8 @@ sudo make altinstall
|
|||
cd ~
|
||||
sudo rm -rf Python-${PYTHON_VER} Python-${PYTHON_VER}.tgz
|
||||
|
||||
print_green 'Installing redis git and weasyprint'
|
||||
sudo apt install -y redis git weasyprint
|
||||
print_green 'Installing redis and git'
|
||||
sudo apt install -y redis git
|
||||
|
||||
print_green 'Installing postgresql'
|
||||
|
||||
|
@ -487,6 +487,19 @@ sudo chmod +x /usr/local/bin/nats-api
|
|||
|
||||
print_green 'Installing the backend'
|
||||
|
||||
# for weasyprint
|
||||
if [[ "$osname" == "debian" ]]; then
|
||||
count=$(dpkg -l | grep -E "libpango-1.0-0|libpangoft2-1.0-0" | wc -l)
|
||||
if ! [ "$count" -eq 2 ]; then
|
||||
sudo apt install -y libpango-1.0-0 libpangoft2-1.0-0
|
||||
fi
|
||||
elif [[ "$osname" == "ubuntu" ]]; then
|
||||
count=$(dpkg -l | grep -E "libpango-1.0-0|libharfbuzz0b|libpangoft2-1.0-0" | wc -l)
|
||||
if ! [ "$count" -eq 3 ]; then
|
||||
sudo apt install -y libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0
|
||||
fi
|
||||
fi
|
||||
|
||||
SETUPTOOLS_VER=$(grep "^SETUPTOOLS_VER" "$SETTINGS_FILE" | awk -F'[= "]' '{print $5}')
|
||||
WHEEL_VER=$(grep "^WHEEL_VER" "$SETTINGS_FILE" | awk -F'[= "]' '{print $5}')
|
||||
|
||||
|
|
17
restore.sh
17
restore.sh
|
@ -281,8 +281,8 @@ sudo make altinstall
|
|||
cd ~
|
||||
sudo rm -rf Python-${PYTHON_VER} Python-${PYTHON_VER}.tgz
|
||||
|
||||
print_green 'Installing redis, git and weasyprint'
|
||||
sudo apt install -y redis git weasyprint
|
||||
print_green 'Installing redis and git'
|
||||
sudo apt install -y redis git
|
||||
|
||||
print_green 'Installing postgresql'
|
||||
|
||||
|
@ -444,6 +444,19 @@ sudo -u postgres psql -c "GRANT USAGE, CREATE ON SCHEMA PUBLIC TO ${pgusername}"
|
|||
gzip -d $tmp_dir/postgres/db*.psql.gz
|
||||
PGPASSWORD=${pgpw} psql -h localhost -U ${pgusername} -d tacticalrmm -f $tmp_dir/postgres/db*.psql
|
||||
|
||||
# for weasyprint
|
||||
if [[ "$osname" == "debian" ]]; then
|
||||
count=$(dpkg -l | grep -E "libpango-1.0-0|libpangoft2-1.0-0" | wc -l)
|
||||
if ! [ "$count" -eq 2 ]; then
|
||||
sudo apt install -y libpango-1.0-0 libpangoft2-1.0-0
|
||||
fi
|
||||
elif [[ "$osname" == "ubuntu" ]]; then
|
||||
count=$(dpkg -l | grep -E "libpango-1.0-0|libharfbuzz0b|libpangoft2-1.0-0" | wc -l)
|
||||
if ! [ "$count" -eq 3 ]; then
|
||||
sudo apt install -y libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0
|
||||
fi
|
||||
fi
|
||||
|
||||
SETUPTOOLS_VER=$(grep "^SETUPTOOLS_VER" "$SETTINGS_FILE" | awk -F'[= "]' '{print $5}')
|
||||
WHEEL_VER=$(grep "^WHEEL_VER" "$SETTINGS_FILE" | awk -F'[= "]' '{print $5}')
|
||||
|
||||
|
|
25
update.sh
25
update.sh
|
@ -171,10 +171,24 @@ EOF
|
|||
sudo systemctl daemon-reload
|
||||
fi
|
||||
|
||||
osname=$(lsb_release -si)
|
||||
osname=${osname^}
|
||||
osname=$(echo "$osname" | tr '[A-Z]' '[a-z]')
|
||||
|
||||
# for weasyprint
|
||||
if [[ "$osname" == "debian" ]]; then
|
||||
count=$(dpkg -l | grep -E "libpango-1.0-0|libpangoft2-1.0-0" | wc -l)
|
||||
if ! [ "$count" -eq 2 ]; then
|
||||
sudo apt install -y libpango-1.0-0 libpangoft2-1.0-0
|
||||
fi
|
||||
elif [[ "$osname" == "ubuntu" ]]; then
|
||||
count=$(dpkg -l | grep -E "libpango-1.0-0|libharfbuzz0b|libpangoft2-1.0-0" | wc -l)
|
||||
if ! [ "$count" -eq 3 ]; then
|
||||
sudo apt install -y libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -f /etc/apt/sources.list.d/nginx.list ]; then
|
||||
osname=$(lsb_release -si)
|
||||
osname=${osname^}
|
||||
osname=$(echo "$osname" | tr '[A-Z]' '[a-z]')
|
||||
codename=$(lsb_release -sc)
|
||||
nginxrepo="$(
|
||||
cat <<EOF
|
||||
|
@ -228,11 +242,6 @@ if ! [[ $HAS_PY311 ]]; then
|
|||
sudo rm -rf Python-${PYTHON_VER} Python-${PYTHON_VER}.tgz
|
||||
fi
|
||||
|
||||
HAS_WEASYPRINT=$(dpkg -l | grep weasyprint)
|
||||
if ! [[ $HAS_WEASYPRINT ]]; then
|
||||
sudo apt install -y weasyprint
|
||||
fi
|
||||
|
||||
arch=$(uname -m)
|
||||
nats_server='/usr/local/bin/nats-server'
|
||||
|
||||
|
|
Loading…
Reference in New Issue