mirror of
https://github.com/searxng/searxng.git
synced 2024-11-25 12:21:00 +00:00
[fix] debian/ubuntu python-is-python3
Closes: https://github.com/searxng/searxng/issues/3235 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
799d72e3fd
commit
5c6b126d7f
4 changed files with 7 additions and 11 deletions
2
manage
2
manage
|
@ -233,7 +233,7 @@ gecko.driver() {
|
|||
build_msg INSTALL "geckodriver already installed"
|
||||
return
|
||||
fi
|
||||
PLATFORM="$(python3 -c 'import platform; print(platform.system().lower(), platform.architecture()[0])')"
|
||||
PLATFORM="$(python -c 'import platform; print(platform.system().lower(), platform.architecture()[0])')"
|
||||
case "$PLATFORM" in
|
||||
"linux 32bit" | "linux2 32bit") ARCH="linux32";;
|
||||
"linux 64bit" | "linux2 64bit") ARCH="linux64";;
|
||||
|
|
|
@ -1674,7 +1674,7 @@ EOF
|
|||
}
|
||||
|
||||
# apt packages
|
||||
LXC_BASE_PACKAGES_debian="bash git build-essential python3 python3-venv"
|
||||
LXC_BASE_PACKAGES_debian="bash git build-essential python3 python3-venv python-is-python3"
|
||||
|
||||
# pacman packages
|
||||
LXC_BASE_PACKAGES_arch="bash git base-devel python"
|
||||
|
|
|
@ -41,7 +41,7 @@ EOF
|
|||
}
|
||||
|
||||
go.ls(){
|
||||
python3 <<EOF
|
||||
python <<EOF
|
||||
import sys, json, requests
|
||||
resp = requests.get("${GO_DL_URL}/?mode=json&include=all")
|
||||
for ver in json.loads(resp.text):
|
||||
|
@ -67,7 +67,7 @@ go.ver_info(){
|
|||
# os: [darwin|freebsd|linux|windows]
|
||||
# arch: [amd64|arm64|386|armv6l|ppc64le|s390x]
|
||||
|
||||
python3 - "$@" <<EOF
|
||||
python - "$@" <<EOF
|
||||
import sys, json, requests
|
||||
resp = requests.get("${GO_DL_URL}/?mode=json&include=all")
|
||||
for ver in json.loads(resp.text):
|
||||
|
|
|
@ -96,13 +96,8 @@ case $DIST_ID-$DIST_VERS in
|
|||
SEARXNG_BUILD_PACKAGES="${SEARXNG_BUILD_PACKAGES_debian}"
|
||||
APACHE_PACKAGES="$APACHE_PACKAGES libapache2-mod-proxy-uwsgi"
|
||||
;;
|
||||
ubuntu-20.04)
|
||||
# https://wiki.ubuntu.com/FocalFossa/ReleaseNotes#Python3_by_default
|
||||
SEARXNG_PACKAGES="${SEARXNG_PACKAGES_debian} python-is-python3"
|
||||
SEARXNG_BUILD_PACKAGES="${SEARXNG_BUILD_PACKAGES_debian}"
|
||||
;;
|
||||
ubuntu-*|debian-*)
|
||||
SEARXNG_PACKAGES="${SEARXNG_PACKAGES_debian}"
|
||||
SEARXNG_PACKAGES="${SEARXNG_PACKAGES_debian} python-is-python3"
|
||||
SEARXNG_BUILD_PACKAGES="${SEARXNG_BUILD_PACKAGES_debian}"
|
||||
;;
|
||||
arch-*)
|
||||
|
@ -453,6 +448,7 @@ searxng.install.clone() {
|
|||
|
||||
# clone repo and add a safe.directory entry to git's system config / see
|
||||
# https://github.com/searxng/searxng/issues/1251
|
||||
git config --system --add safe.directory "${REPO_ROOT}/.git"
|
||||
git_clone "$REPO_ROOT" "${SEARXNG_SRC}" \
|
||||
"$GIT_BRANCH" "${SERVICE_USER}"
|
||||
git config --system --add safe.directory "${SEARXNG_SRC}"
|
||||
|
@ -489,7 +485,7 @@ searxng.install.pyenv() {
|
|||
info_msg "create pyenv in ${SEARXNG_PYENV}"
|
||||
tee_stderr 0.1 <<EOF | sudo -H -u "${SERVICE_USER}" -i 2>&1 | prefix_stdout "$_service_prefix"
|
||||
rm -rf "${SEARXNG_PYENV}"
|
||||
python3 -m venv "${SEARXNG_PYENV}"
|
||||
python -m venv "${SEARXNG_PYENV}"
|
||||
grep -qFs -- 'source ${SEARXNG_PYENV}/bin/activate' ~/.profile \
|
||||
|| echo 'source ${SEARXNG_PYENV}/bin/activate' >> ~/.profile
|
||||
EOF
|
||||
|
|
Loading…
Reference in a new issue