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 (``make help``):
23.. program-output:: bash -c "cd ..; make --no-print-directory help"
37.. _git stash: https://git-scm.com/docs/git-stash
39.. sidebar:: fork & upstream
41 Commit changes in your (local) branch, fork or whatever, but do not push them
42 upstream / `git stash`_ is your friend.
44The main setup is done in the :origin:`Makefile`.
46.. literalinclude:: ../../Makefile
47 :start-after: START Makefile setup
48 :end-before: END Makefile setup
50:GIT_URL: Changes this, to point to your searx fork.
51:GIT_BRANCH: Changes this, to point to your searx branch.
52:SEARX_URL: Changes this, to point to your searx instance.
53:DOCS_URL: If you host your own (*brand*) documentation, change this URL.
55If you change any of this build environment variables, you have to run ``make
67.. sidebar:: activate environment
69 ``source ./local/py3/bin/activate``
71With Makefile we do no longer need to build up the virualenv manually (as
72described in the :ref:`devquickstart` guide). Jump into your git working tree
73and release a ``make pyenv``:
79 PYENV usage: source ./local/py3/bin/activate
82With target ``pyenv`` a development environment (aka virtualenv) was build up in
83``./local/py3/``. To make a *developer install* of searx (:origin:`setup.py`)
84into this environment, use make target ``install``:
89 PYENV usage: source ./local/py3/bin/activate
90 PYENV using virtualenv from ./local/py3
93You have never to think about intermediate targets like ``pyenv`` or
94``install``, the ``Makefile`` chains them as requisites. Just run your main
97.. sidebar:: drop environment
99 To get rid of the existing environment before re-build use :ref:`clean target
102If you think, something goes wrong with your ./local environment or you change
103the :origin:`setup.py` file (or the requirements listed in
104:origin:`requirements-dev.txt` and :origin:`requirements.txt`), you have to call
113To get up a running a developer instance simply call ``make run``. This enables
114*debug* option in :origin:`searx/settings.yml`, starts a ``./searx/webapp.py``
115instance, disables *debug* option again and opens the URL in your favorite WEB
116browser (:man:`xdg-open`):
121 PYENV usage: source ./local/py3/bin/activate
123 ./local/py3/bin/python ./searx/webapp.py
125 INFO:werkzeug: * Running on http://127.0.0.1:8888/ (Press CTRL+C to quit)
133Drop all intermediate files, all builds, but keep sources untouched. Includes
134target ``pyclean`` which drops ./local environment. Before calling ``make
135clean`` stop all processes using :ref:`make pyenv`.
145``make docs docs-live docs-clean``
146==================================
148We describe the usage of the ``doc*`` targets in the :ref:`How to contribute /
149Documentation <contrib docs>` section. If you want to edit the documentation
150read our :ref:`make docs-live` section. If you are working in your own brand,
151adjust your :ref:`Makefile setup <makefile setup>`.
159To deploy on github.io first adjust your :ref:`Makefile setup <makefile
160setup>`. For any further read :ref:`deploy on github.io`.
167Runs a series of tests: ``test.pep8``, ``test.unit``, ``test.robot`` and does
168additional :ref:`pylint checks <make pylint>`. You can run tests selective,
173 $ make test.pep8 test.unit test.sh
174 . ./local/py3/bin/activate; ./manage.sh pep8_check
175 [!] Running pep8 check
176 . ./local/py3/bin/activate; ./manage.sh unit_tests
177 [!] Running unit tests
184.. _Pylint: https://www.pylint.org/
186Before commiting its recommend to do some (more) linting. Pylint_ is known as
187one of the best source-code, bug and quality checker for the Python programming
188language. Pylint_ is not yet a quality gate within our searx project (like
189:ref:`test.pep8 <make test>` it is), but Pylint_ can help to improve code
190quality anyway. The pylint profile we use at searx project is found in
191project's root folder :origin:`.pylintrc`.
193Code quality is a ongoing process. Don't try to fix all messages from Pylint,
194run Pylint and check if your changed lines are bringing up new messages. If so,
195fix it. By this, code quality gets incremental better and if there comes the
196day, the linting is balanced out, we might decide to add Pylint as a quality
203.. _PyPi: https://pypi.org/
204.. _twine: https://twine.readthedocs.io/en/latest/
206Build Python packages in ``./dist/py``.
217 searx-0.15.0-py3-none-any.whl searx-0.15.0.tar.gz
219To upload packages to PyPi_, there is also a ``upload-pypi`` target. It needs
220twine_ to be installed. Since you are not the owner of :pypi:`searx` you will
221never 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