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:`.config.sh` (read :ref:`toolboxing
50 export SEARX_URL=https://searx.me
52 export GIT_URL=https://github.com/asciimoo/searx
53 export DOCS_URL=https://asciimoo.github.io/searx
55.. sidebar:: fork & upstream
57 Commit changes in your (local) branch, fork or whatever, but do not push them
58 upstream / `git stash`_ is your friend.
60:GIT_URL: Changes this, to point to your searx fork.
62:SEARX_URL: Changes this, to point to your searx instance.
64:DOCS_URL: If you host your own (branded) documentation, change this URL.
71.. sidebar:: activate environment
73 ``source ./local/py3/bin/activate``
75With Makefile we do no longer need to build up the virualenv manually (as
76described in the :ref:`devquickstart` guide). Jump into your git working tree
77and release a ``make pyenv``:
83 PYENV usage: source ./local/py3/bin/activate
86With target ``pyenv`` a development environment (aka virtualenv) was build up in
87``./local/py3/``. To make a *developer install* of searx (:origin:`setup.py`)
88into this environment, use make target ``install``:
93 PYENV usage: source ./local/py3/bin/activate
94 PYENV using virtualenv from ./local/py3
97You have never to think about intermediate targets like ``pyenv`` or
98``install``, the ``Makefile`` chains them as requisites. Just run your main
101.. sidebar:: drop environment
103 To get rid of the existing environment before re-build use :ref:`clean target
106If you think, something goes wrong with your ./local environment or you change
107the :origin:`setup.py` file (or the requirements listed in
108:origin:`requirements-dev.txt` and :origin:`requirements.txt`), you have to call
117To get up a running a developer instance simply call ``make run``. This enables
118*debug* option in :origin:`searx/settings.yml`, starts a ``./searx/webapp.py``
119instance, disables *debug* option again and opens the URL in your favorite WEB
120browser (:man:`xdg-open`):
125 PYENV usage: source ./local/py3/bin/activate
127 ./local/py3/bin/python ./searx/webapp.py
129 INFO:werkzeug: * Running on http://127.0.0.1:8888/ (Press CTRL+C to quit)
137Drop all intermediate files, all builds, but keep sources untouched. Includes
138target ``pyclean`` which drops ./local environment. Before calling ``make
139clean`` stop all processes using :ref:`make pyenv`.
149``make docs docs-live docs-clean``
150==================================
152We describe the usage of the ``doc*`` targets in the :ref:`How to contribute /
153Documentation <contrib docs>` section. If you want to edit the documentation
154read our :ref:`make docs-live` section. If you are working in your own brand,
155adjust your :ref:`Makefile setup <makefile setup>`.
163To deploy on github.io first adjust your :ref:`Makefile setup <makefile
164setup>`. For any further read :ref:`deploy on github.io`.
171Runs a series of tests: ``test.pep8``, ``test.unit``, ``test.robot`` and does
172additional :ref:`pylint checks <make pylint>`. You can run tests selective,
177 $ make test.pep8 test.unit test.sh
178 . ./local/py3/bin/activate; ./manage.sh pep8_check
179 [!] Running pep8 check
180 . ./local/py3/bin/activate; ./manage.sh unit_tests
181 [!] Running unit tests
188.. _Pylint: https://www.pylint.org/
190Before commiting its recommend to do some (more) linting. Pylint_ is known as
191one of the best source-code, bug and quality checker for the Python programming
192language. Pylint_ is not yet a quality gate within our searx project (like
193:ref:`test.pep8 <make test>` it is), but Pylint_ can help to improve code
194quality anyway. The pylint profile we use at searx project is found in
195project's root folder :origin:`.pylintrc`.
197Code quality is a ongoing process. Don't try to fix all messages from Pylint,
198run Pylint and check if your changed lines are bringing up new messages. If so,
199fix it. By this, code quality gets incremental better and if there comes the
200day, the linting is balanced out, we might decide to add Pylint as a quality
207.. _PyPi: https://pypi.org/
208.. _twine: https://twine.readthedocs.io/en/latest/
210Build Python packages in ``./dist/py``.
221 searx-0.15.0-py3-none-any.whl searx-0.15.0.tar.gz
223To upload packages to PyPi_, there is also a ``upload-pypi`` target. It needs
224twine_ to be installed. Since you are not the owner of :pypi:`searx` you will
225never 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