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:`makefile setup`
12 and :ref:`make pyenv`.
14 To install system requirements follow :ref:`buildhosts`.
16With the aim to simplify development cycles, started with :pull:`1756` a
17``Makefile`` based boilerplate was added. If you are not familiar with
18Makefiles, 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::
24 test - run developer tests
25 docs - build documentation
26 docs-live - autobuild HTML documentation while editing
27 run - run developer instance
28 install - developer install (./local)
29 uninstall - uninstall (./local)
30 gh-pages - build docs & deploy on gh-pages branch
31 clean - drop builds and environments
45.. _git stash: https://git-scm.com/docs/git-stash
47The main setup is done in the :origin:`Makefile`::
49 export GIT_URL=https://github.com/asciimoo/searx
50 export SEARX_URL=https://searx.me
51 export DOCS_URL=https://asciimoo.github.io/searx
53.. sidebar:: fork & upstream
55 Commit changes in your (local) branch, fork or whatever, but do not push them
56 upstream / `git stash`_ is your friend.
58:GIT_URL: Changes this, to point to your searx fork.
60:SEARX_URL: Changes this, to point to your searx instance.
62:DOCS_URL: If you host your own (branded) documentation, change this URL.
69.. sidebar:: activate environment
71 ``source ./local/py3/bin/activate``
73With Makefile we do no longer need to build up the virualenv manually (as
74described in the :ref:`devquickstart` guide). Jump into your git working tree
75and release a ``make pyenv``:
81 PYENV usage: source ./local/py3/bin/activate
84With target ``pyenv`` a development environment (aka virtualenv) was build up in
85``./local/py3/``. To make a *developer install* of searx (:origin:`setup.py`)
86into this environment, use make target ``install``:
91 PYENV usage: source ./local/py3/bin/activate
92 PYENV using virtualenv from ./local/py3
95You have never to think about intermediate targets like ``pyenv`` or
96``install``, the ``Makefile`` chains them as requisites. Just run your main
99.. sidebar:: drop environment
101 To get rid of the existing environment before re-build use :ref:`clean target
104If you think, something goes wrong with your ./local environment or you change
105the :origin:`setup.py` file (or the requirements listed in
106:origin:`requirements-dev.txt` and :origin:`requirements.txt`), you have to call
115To get up a running a developer instance simply call ``make run``. This enables
116*debug* option in :origin:`searx/settings.yml`, starts a ``./searx/webapp.py``
117instance, disables *debug* option again and opens the URL in your favorite WEB
118browser (:man:`xdg-open`):
123 PYENV usage: source ./local/py3/bin/activate
125 ./local/py3/bin/python ./searx/webapp.py
127 INFO:werkzeug: * Running on http://127.0.0.1:8888/ (Press CTRL+C to quit)
135Drop all intermediate files, all builds, but keep sources untouched. Includes
136target ``pyclean`` which drops ./local environment. Before calling ``make
137clean`` stop all processes using :ref:`make pyenv`.
147``make docs docs-live docs-clean``
148==================================
150We describe the usage of the ``doc*`` targets in the :ref:`How to contribute /
151Documentation <contrib docs>` section. If you want to edit the documentation
152read our :ref:`make docs-live` section. If you are working in your own brand,
153adjust your :ref:`Makefile setup <makefile setup>`.
161To deploy on github.io first adjust your :ref:`Makefile setup <makefile
162setup>`. For any further read :ref:`deploy on github.io`.
169Runs a series of tests: ``test.pep8``, ``test.unit``, ``test.robot`` and does
170additional :ref:`pylint checks <make pylint>`. You can run tests selective,
175 $ make test.pep8 test.unit test.sh
176 . ./local/py3/bin/activate; ./manage.sh pep8_check
177 [!] Running pep8 check
178 . ./local/py3/bin/activate; ./manage.sh unit_tests
179 [!] Running unit tests
186.. _Pylint: https://www.pylint.org/
188Before commiting its recommend to do some (more) linting. Pylint_ is known as
189one of the best source-code, bug and quality checker for the Python programming
190language. Pylint_ is not yet a quality gate within our searx project (like
191:ref:`test.pep8 <make test>` it is), but Pylint_ can help to improve code
192quality anyway. The pylint profile we use at searx project is found in
193project's root folder :origin:`.pylintrc`.
195Code quality is a ongoing process. Don't try to fix all messages from Pylint,
196run Pylint and check if your changed lines are bringing up new messages. If so,
197fix it. By this, code quality gets incremental better and if there comes the
198day, the linting is balanced out, we might decide to add Pylint as a quality
205.. _PyPi: https://pypi.org/
206.. _twine: https://twine.readthedocs.io/en/latest/
208Build Python packages in ``./dist/py``.
219 searx-0.15.0-py3-none-any.whl searx-0.15.0.tar.gz
221To upload packages to PyPi_, there is also a ``upload-pypi`` target. It needs
222twine_ to be installed. Since you are not the owner of :pypi:`searx` you will
223never 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