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 pyenv`.
13 To install system requirements follow :ref:`buildhosts`.
15With the aim to simplify development cycles, started with :pull:`1756` a
16``Makefile`` based boilerplate was added. If you are not familiar with
17Makefiles, we recommend to read gnu-make_ introduction.
19The usage is simple, just type ``make {target-name}`` to *build* a target.
20Calling the ``help`` target gives a first overview (``make help``):
22.. program-output:: bash -c "cd ..; make --no-print-directory help"
35.. sidebar:: activate environment
37 ``source ./local/py3/bin/activate``
39With Makefile we do no longer need to build up the virtualenv manually (as
40described in the :ref:`devquickstart` guide). Jump into your git working tree
41and release a ``make pyenv``:
47 PYENV usage: source ./local/py3/bin/activate
50With target ``pyenv`` a development environment (aka virtualenv) was build up in
51``./local/py3/``. To make a *developer install* of searx (:origin:`setup.py`)
52into this environment, use make target ``install``:
57 PYENV usage: source ./local/py3/bin/activate
58 PYENV using virtualenv from ./local/py3
61You have never to think about intermediate targets like ``pyenv`` or
62``install``, the ``Makefile`` chains them as requisites. Just run your main
65.. sidebar:: drop environment
67 To get rid of the existing environment before re-build use :ref:`clean target
70If you think, something goes wrong with your ./local environment or you change
71the :origin:`setup.py` file (or the requirements listed in
72:origin:`requirements-dev.txt` and :origin:`requirements.txt`), you have to call
81To get up a running a developer instance simply call ``make run``. This enables
82*debug* option in :origin:`searx/settings.yml`, starts a ``./searx/webapp.py``
83instance, disables *debug* option again and opens the URL in your favorite WEB
84browser (:man:`xdg-open`):
89 PYENV usage: source ./local/py3/bin/activate
91 ./local/py3/bin/python ./searx/webapp.py
93 INFO:werkzeug: * Running on http://127.0.0.1:8888/ (Press CTRL+C to quit)
101Drop all intermediate files, all builds, but keep sources untouched. Includes
102target ``pyclean`` which drops ./local environment. Before calling ``make
103clean`` stop all processes using :ref:`make pyenv`.
113``make docs docs-live docs-clean``
114==================================
116We describe the usage of the ``doc*`` targets in the :ref:`How to contribute /
117Documentation <contrib docs>` section. If you want to edit the documentation
118read our :ref:`make docs-live` section. If you are working in your own brand,
119adjust your :ref:`settings global`.
123``make books/{name}.html books/{name}.pdf``
124===========================================
126.. _intersphinx: https://www.sphinx-doc.org/en/stable/ext/intersphinx.html
127.. _XeTeX: https://tug.org/xetex/
131 To build PDF a XeTeX_ is needed, see :ref:`buildhosts`.
134The ``books/{name}.*`` targets are building *books*. A *book* is a
135sub-directory containing a ``conf.py`` file. One example is the user handbook
136which can deployed separately (:origin:`docs/user/conf.py`). Such ``conf.py``
137do inherit from :origin:`docs/conf.py` and overwrite values to fit *book's*
140With the help of Intersphinx_ (:ref:`reST smart ref`) the links to searx’s
141documentation outside of the book will be bound by the object inventory of
142``DOCS_URL``. Take into account that URLs will be picked from the inventary at
143documentation's build time.
145Use ``make docs-help`` to see which books available:
147.. program-output:: bash -c "cd ..; make --no-print-directory docs-help"
156To deploy on github.io first adjust your :ref:`settings global`. For any
157further read :ref:`deploy on github.io`.
164Runs a series of tests: ``test.pep8``, ``test.unit``, ``test.robot`` and does
165additional :ref:`pylint checks <make pylint>`. You can run tests selective,
170 $ make test.pep8 test.unit test.sh
171 . ./local/py3/bin/activate; ./manage.sh pep8_check
172 [!] Running pep8 check
173 . ./local/py3/bin/activate; ./manage.sh unit_tests
174 [!] Running unit tests
181.. _Pylint: https://www.pylint.org/
183Before commiting its recommend to do some (more) linting. Pylint_ is known as
184one of the best source-code, bug and quality checker for the Python programming
185language. Pylint_ is not yet a quality gate within our searx project (like
186:ref:`test.pep8 <make test>` it is), but Pylint_ can help to improve code
187quality anyway. The pylint profile we use at searx project is found in
188project's root folder :origin:`.pylintrc`.
190Code quality is a ongoing process. Don't try to fix all messages from Pylint,
191run Pylint and check if your changed lines are bringing up new messages. If so,
192fix it. By this, code quality gets incremental better and if there comes the
193day, the linting is balanced out, we might decide to add Pylint as a quality
200.. _PyPi: https://pypi.org/
201.. _twine: https://twine.readthedocs.io/en/latest/
203Build Python packages in ``./dist/py``.
214 searx-0.15.0-py3-none-any.whl searx-0.15.0.tar.gz
216To upload packages to PyPi_, there is also a ``upload-pypi`` target. It needs
217twine_ to be installed. Since you are not the owner of :pypi:`searx` you will
218never need the latter.
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