summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.dir-locals.el2
-rw-r--r--.github/workflows/integration.yml42
-rw-r--r--searx/metrology/error_recorder.py2
-rwxr-xr-xutils/lib.sh11
-rwxr-xr-xutils/lxc.sh2
-rw-r--r--utils/makefile.include2
-rw-r--r--utils/makefile.python15
-rwxr-xr-xutils/searx.sh8
8 files changed, 37 insertions, 47 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
index d7ec87921..970199b42 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -25,7 +25,7 @@
;; Alternatively create the virtualenv, source it and install jedi + epc
;; (required by `emacs-jedi <https://tkf.github.io/emacs-jedi>`_)::
;;
-;; $ virtualenv --python=python3 "--no-site-packages" ./local/py3
+;; $ python -m venv ./local/py3
;; ...
;; $ source ./local/py3/bin/activate
;; (py3)$ # now install into the activated 'py3' environment ..
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
index 8821ec2d0..1ba077ad3 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -11,26 +11,26 @@ jobs:
os: [ubuntu-latest]
python-version: [3.5, 3.6, 3.7, 3.8]
steps:
- - name: Checkout πŸ›ŽοΈ
+ - name: Checkout
uses: actions/checkout@v2
- - name: Install Ubuntu packages 🧰
+ - name: Install Ubuntu packages
run: |
sudo ./utils/searx.sh install packages
sudo apt install firefox
- - name: Set up Python 🧰
+ - name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- - name: Install Python dependencies 🧰
+ - name: Install Python dependencies
run: |
make V=1 install
make V=1 gecko.driver
- - name: Run tests πŸ—οΈ
+ - name: Run tests
run: make V=1 test
- - name: Test coverage πŸ—ΊοΈ
+ - name: Test coverage
run: make V=1 test.coverage
- - name: Store coverage result πŸ—ΊοΈ
+ - name: Store coverage result
uses: actions/upload-artifact@v2
with:
name: coverage-${{ matrix.python-version }}
@@ -41,33 +41,33 @@ jobs:
name: Themes
runs-on: ubuntu-latest
steps:
- - name: Checkout πŸ›ŽοΈ
+ - name: Checkout
uses: actions/checkout@v2
- - name: Install Ubuntu packages 🧰
+ - name: Install Ubuntu packages
run: sudo ./utils/searx.sh install packages
- - name: Install node dependencies 🧰
+ - name: Install node dependencies
run: make V=1 node.env
- - name: Build themes πŸ—οΈ
+ - name: Build themes
run: make V=1 themes
documentation:
name: Documentation
runs-on: ubuntu-latest
steps:
- - name: Checkout πŸ›ŽοΈ
+ - name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- - name: Install Ubuntu packages 🧰
+ - name: Install Ubuntu packages
run: sudo ./utils/searx.sh install buildhost
- - name: Set up Python 🧰
+ - name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- - name: Build documentation πŸ—οΈ
+ - name: Build documentation
run: SEARX_DEBUG=1 make V=1 travis-gh-pages
- - name: Deploy πŸš€
+ - name: Deploy
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
@@ -87,24 +87,24 @@ jobs:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
runs-on: ubuntu-latest
steps:
- - name: Checkout πŸ›ŽοΈ
+ - name: Checkout
if: env.DOCKERHUB_USERNAME != null
uses: actions/checkout@v2
with:
# make sure "make docker.push" can get the git history
fetch-depth: '0'
- - name: Set up QEMU 🧰
+ - name: Set up QEMU
if: env.DOCKERHUB_USERNAME != null
uses: docker/setup-qemu-action@v1
- - name: Set up Docker Buildx 🧰
+ - name: Set up Docker Buildx
if: env.DOCKERHUB_USERNAME != null
uses: docker/setup-buildx-action@v1
- - name: Login to DockerHub πŸ”’
+ - name: Login to DockerHub
if: env.DOCKERHUB_USERNAME != null
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- - name: Build and push 🐳
+ - name: Build and push
if: env.DOCKERHUB_USERNAME != null
run: make -e GIT_URL=$(git remote get-url origin) docker.push
diff --git a/searx/metrology/error_recorder.py b/searx/metrology/error_recorder.py
index fee1ef7d6..65dbf33c8 100644
--- a/searx/metrology/error_recorder.py
+++ b/searx/metrology/error_recorder.py
@@ -47,7 +47,7 @@ class ErrorContext:
def add_error_context(engine_name: str, error_context: ErrorContext) -> None:
errors_for_engine = errors_per_engines.setdefault(engine_name, {})
errors_for_engine[error_context] = errors_for_engine.get(error_context, 0) + 1
- logger.debug('⚠️ %s: %s', engine_name, str(error_context))
+ logger.debug('%s: %s', engine_name, str(error_context))
def get_trace(traces):
diff --git a/utils/lib.sh b/utils/lib.sh
index aa49da5b2..0d93138cc 100755
--- a/utils/lib.sh
+++ b/utils/lib.sh
@@ -1399,16 +1399,16 @@ EOF
}
# apt packages
-LXC_BASE_PACKAGES_debian="bash git build-essential python3 virtualenv"
+LXC_BASE_PACKAGES_debian="bash git build-essential python3 python3-venv"
# pacman packages
-LXC_BASE_PACKAGES_arch="bash git base-devel python python-virtualenv"
+LXC_BASE_PACKAGES_arch="bash git base-devel python"
# dnf packages
-LXC_BASE_PACKAGES_fedora="bash git @development-tools python virtualenv"
+LXC_BASE_PACKAGES_fedora="bash git @development-tools python"
# yum packages
-LXC_BASE_PACKAGES_centos="bash git @development-tools python python-virtualenv"
+LXC_BASE_PACKAGES_centos="bash git python3"
case $DIST_ID in
ubuntu|debian) LXC_BASE_PACKAGES="${LXC_BASE_PACKAGES_debian}" ;;
@@ -1420,6 +1420,9 @@ esac
lxc_install_base_packages() {
info_msg "install LXC_BASE_PACKAGES in container $1"
+ case $DIST_ID in
+ centos) yum groupinstall "Development Tools" -y ;;
+ esac
pkg_install "${LXC_BASE_PACKAGES}"
}
diff --git a/utils/lxc.sh b/utils/lxc.sh
index 30534c6a2..11dbe578d 100755
--- a/utils/lxc.sh
+++ b/utils/lxc.sh
@@ -20,7 +20,7 @@ lxc_set_suite_env
LXC_HOST_PREFIX="${LXC_HOST_PREFIX:-test}"
-# where all folders from HOST are mounted
+# Location in the container where all folders from HOST are mounted
LXC_SHARE_FOLDER="/share"
LXC_REPO_ROOT="${LXC_SHARE_FOLDER}/$(basename "${REPO_ROOT}")"
diff --git a/utils/makefile.include b/utils/makefile.include
index 65aca70f0..35a5134d9 100644
--- a/utils/makefile.include
+++ b/utils/makefile.include
@@ -3,7 +3,7 @@
ifeq (,$(wildcard /.lxcenv.mk))
PHONY += lxc-activate lxc-purge
lxc-activate:
- @$(MAKE) -s -f /share/searx/utils/makefile.lxc lxc-activate
+ @$(MAKE) -s -f "$$(dirname $(abspath $(lastword $(MAKEFILE_LIST))))/makefile.lxc" lxc-activate
lxc-purge:
$(Q)rm -rf ./lxc
else
diff --git a/utils/makefile.python b/utils/makefile.python
index 668b0894b..12e3e1236 100644
--- a/utils/makefile.python
+++ b/utils/makefile.python
@@ -41,19 +41,6 @@ ifeq ($(OS),Windows_NT)
endif
VTENV_OPTS ?=
-ifeq ($(PYTHON),python)
- VIRTUALENV = virtualenv
-else
- VIRTUALENV = virtualenv --python=$(PYTHON)
-endif
-
-ifeq ($(KBUILD_VERBOSE),1)
- PIP_VERBOSE =
- VIRTUALENV_VERBOSE =
-else
- PIP_VERBOSE = "-q"
- VIRTUALENV_VERBOSE = "-q"
-endif
python-help::
@echo 'makefile.python:'
@@ -125,7 +112,7 @@ quiet_cmd_pyenvuninstall = PYENV uninstall $2
quiet_cmd_virtualenv = PYENV usage: $ source ./$@/bin/activate
cmd_virtualenv = \
if [ ! -d "./$(PY_ENV)" ];then \
- $(VIRTUALENV) $(VIRTUALENV_VERBOSE) $(VTENV_OPTS) $2; \
+ $(PYTHON) -m venv $(VTENV_OPTS) $2; \
else \
echo "PYENV using virtualenv from $2"; \
fi
diff --git a/utils/searx.sh b/utils/searx.sh
index 06b3c2dfc..5a24a016e 100755
--- a/utils/searx.sh
+++ b/utils/searx.sh
@@ -43,7 +43,7 @@ SEARX_UWSGI_SOCKET="/run/uwsgi/app/searx/socket"
# apt packages
SEARX_PACKAGES_debian="\
-virtualenv python3-dev python3-babel python3-venv
+python3-dev python3-babel python3-venv
uwsgi uwsgi-plugin-python3
git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev
shellcheck"
@@ -55,7 +55,7 @@ latexmk"
# pacman packages
SEARX_PACKAGES_arch="\
-python-virtualenv python python-pip python-lxml python-babel
+python python-pip python-lxml python-babel
uwsgi uwsgi-plugin-python
git base-devel libxml2
shellcheck"
@@ -66,7 +66,7 @@ texlive-core texlive-latexextra ttf-dejavu"
# dnf packages
SEARX_PACKAGES_fedora="\
-virtualenv python python-pip python-lxml python-babel
+python python-pip python-lxml python-babel
uwsgi uwsgi-plugin-python3
git @development-tools libxml2
ShellCheck"
@@ -79,7 +79,7 @@ dejavu-sans-mono-fonts"
# yum packages
SEARX_PACKAGES_centos="\
-python36-virtualenv python36 python36-pip python36-lxml python-babel
+python36 python36-pip python36-lxml python-babel
uwsgi uwsgi-plugin-python3
git @development-tools libxml2
ShellCheck"