7.. _gnu-make: https://www.gnu.org/software/make/manual/make.html#Introduction
9.. sidebar:: build environment
11 Before looking deeper at the targets, first read about :ref:`make
14 To install system requirements follow :ref:`buildhosts`.
16All relevant build tasks are implemented in :origin:`manage.sh` and for CI or
17IDE integration a small ``Makefile`` wrapper is available. If you are not
18familiar with Makefiles, we recommend to read gnu-make_ introduction.
20The usage is simple, just type ``make {target-name}`` to *build* a target.
21Calling the ``help`` target gives a first overview (``make help``):
23.. program-output:: bash -c "cd ..; make --no-print-directory help"
35.. sidebar:: activate environment
37 ``source ./local/py3/bin/activate``
39We do no longer need to build up the virtualenv manually. Jump into your git
40working tree and release a ``make install`` to get a virtualenv with a
41*developer install* of searx (:origin:`setup.py`). ::
45 PYENV [virtualenv] installing ./requirements*.txt into local/py3
48 PYENV [install] pip install -e 'searx[test]'
50 Successfully installed argparse-1.4.0 searx
51 BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
52 BUILDENV INFO:searx:Initialisation done
53 BUILDENV build utils/brand.env
55If you release ``make install`` multiple times the installation will only
56rebuild if the sha256 sum of the *requirement files* fails. With other words:
57the check fails if you edit the requirements listed in
58:origin:`requirements-dev.txt` and :origin:`requirements.txt`). ::
62 PYENV [virtualenv] requirements.sha256 failed
63 [virtualenv] - 6cea6eb6def9e14a18bf32f8a3e... ./requirements-dev.txt
64 [virtualenv] - 471efef6c73558e391c3adb35f4... ./requirements.txt
66 PYENV [virtualenv] installing ./requirements*.txt into local/py3
69 PYENV [install] pip install -e 'searx[test]'
71 Successfully installed argparse-1.4.0 searx
72 BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
73 BUILDENV INFO:searx:Initialisation done
74 BUILDENV build utils/brand.env
76.. sidebar:: drop environment
78 To get rid of the existing environment before re-build use :ref:`clean target
81If you think, something goes wrong with your ./local environment or you change
82the :origin:`setup.py` file, you have to call :ref:`make clean`.
89To get up a running a developer instance simply call ``make run``. This enables
90*debug* option in :origin:`searx/settings.yml`, starts a ``./searx/webapp.py``
91instance, disables *debug* option again and opens the URL in your favorite WEB
92browser (:man:`xdg-open`)::
96 SEARX_DEBUG=1 ./manage.sh pyenv.cmd python ./searx/webapp.py
98 INFO:werkzeug: * Running on http://127.0.0.1:8888/ (Press CTRL+C to quit)
105Drop all intermediate files, all builds, but keep sources untouched. Before
106calling ``make clean`` stop all processes using :ref:`make install`. ::
110 PYENV [virtualenv] drop ./local/py3
111 CLEAN docs -- ./build/docs ./dist/docs
112 CLEAN locally installed npm dependencies
118``make docs docs.autobuild docs.clean``
119=======================================
121We describe the usage of the ``doc.*`` targets in the :ref:`How to contribute /
122Documentation <contrib docs>` section. If you want to edit the documentation
123read our :ref:`make docs.live` section. If you are working in your own brand,
124adjust your :ref:`settings global`.
126.. _make docs.gh-pages:
128``make docs.gh-pages``
129======================
131To deploy on github.io first adjust your :ref:`settings global`. For any
132further read :ref:`deploy on github.io`.
139Runs a series of tests: :ref:`make test.pylint`, ``test.pep8``, ``test.unit``
140and ``test.robot``. You can run tests selective, e.g.::
142 $ make test.pep8 test.unit test.sh
154:ref:`sh lint` / if you have changed some bash scripting run this test before
162.. _Pylint: https://www.pylint.org/
164Pylint_ is known as one of the best source-code, bug and quality checker for the
165Python programming language. The pylint profile we use at searx project is
166found in project's root folder :origin:`.pylintrc`.
168.. _make search.checker:
170``search.checker.{engine name}``
171================================
173To check all engines::
177To check a engine with whitespace in the name like *google news* replace space
180 make search.checker.google_news
182To see HTTP requests and more use SEARX_DEBUG::
184 make SEARX_DEBUG=1 search.checker.google_news
186.. _3xx: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_redirection
188To filter out HTTP redirects (3xx_)::
190 make SEARX_DEBUG=1 search.checker.google_news | grep -A1 "HTTP/1.1\" 3[0-9][0-9]"
192 Engine google news Checking
193 https://news.google.com:443 "GET /search?q=life&hl=en&lr=lang_en&ie=utf8&oe=utf8&ceid=US%3Aen&gl=US HTTP/1.1" 302 0
194 https://news.google.com:443 "GET /search?q=life&hl=en-US&lr=lang_en&ie=utf8&oe=utf8&ceid=US:en&gl=US HTTP/1.1" 200 None
196 https://news.google.com:443 "GET /search?q=computer&hl=en&lr=lang_en&ie=utf8&oe=utf8&ceid=US%3Aen&gl=US HTTP/1.1" 302 0
197 https://news.google.com:443 "GET /search?q=computer&hl=en-US&lr=lang_en&ie=utf8&oe=utf8&ceid=US:en&gl=US HTTP/1.1" 200 None
204.. _PyPi: https://pypi.org/
205.. _twine: https://twine.readthedocs.io/en/latest/
207Build Python packages in ``./dist/py``::
218 searx-0.18.0-py3-none-any.whl searx-0.18.0.tar.gz
220To upload packages to PyPi_, there is also a ``pypi.upload`` target (to test use
221``pypi.upload.test``). Since you are not the owner of :pypi:`searx` you will
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list