<p>Before looking deeper at the targets, first read about <aclass="reference internal"href="#makefile-setup"><spanclass="std std-ref">Makefile setup</span></a>
<p>With the aim to simplify development cycles, started with <aclass="reference external"href="https://github.com/asciimoo/searx/pull/1756">PR 1756</a> a
<codeclass="docutils literal notranslate"><spanclass="pre">Makefile</span></code> based boilerplate was added. If you are not familiar with
Makefiles, we recommend to read <aclass="reference external"href="https://www.gnu.org/software/make/manual/make.html#Introduction">gnu-make</a> introduction.</p>
<p>The usage is simple, just type <codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">{target-name}</span></code> to <em>build</em> a target.
Calling the <codeclass="docutils literal notranslate"><spanclass="pre">help</span></code> target gives a first overview (<codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">help</span></code>):</p>
<divclass="highlight-text notranslate"><divclass="highlight"><pre><span></span> test - run developer tests
<spanid="id1"></span><h2><aclass="toc-backref"href="#id7">Makefile setup</a><aclass="headerlink"href="#makefile-setup"title="Permalink to this headline">¶</a></h2>
<spanid="make-pyenv"></span><h2><aclass="toc-backref"href="#id8">Python environment</a><aclass="headerlink"href="#python-environment"title="Permalink to this headline">¶</a></h2>
<p>With Makefile we do no longer need to build up the virualenv manually (as
described in the <aclass="reference internal"href="quickstart.html#devquickstart"><spanclass="std std-ref">Development Quickstart</span></a> guide). Jump into your git working tree
and release a <codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">pyenv</span></code>:</p>
<p>With target <codeclass="docutils literal notranslate"><spanclass="pre">pyenv</span></code> a development environment (aka virtualenv) was build up in
<codeclass="docutils literal notranslate"><spanclass="pre">./local/py3/</span></code>. To make a <em>developer install</em> of searx (<aclass="reference external"href="https://github.com/asciimoo/searx/blob/master/setup.py">git://setup.py</a>)
<p>You have never to think about intermediate targets like <codeclass="docutils literal notranslate"><spanclass="pre">pyenv</span></code> or
<codeclass="docutils literal notranslate"><spanclass="pre">install</span></code>, the <codeclass="docutils literal notranslate"><spanclass="pre">Makefile</span></code> chains them as requisites. Just run your main
target.</p>
<divclass="sidebar">
<pclass="sidebar-title">drop environment</p>
<p>To get rid of the existing environment before re-build use <aclass="reference internal"href="#make-clean"><spanclass="std std-ref">clean target</span></a> first.</p>
</div>
<p>If you think, something goes wrong with your ./local environment or you change
the <aclass="reference external"href="https://github.com/asciimoo/searx/blob/master/setup.py">git://setup.py</a> file (or the requirements listed in
<aclass="reference external"href="https://github.com/asciimoo/searx/blob/master/requirements-dev.txt">git://requirements-dev.txt</a> and <aclass="reference external"href="https://github.com/asciimoo/searx/blob/master/requirements.txt">git://requirements.txt</a>), you have to call
<spanid="id2"></span><h2><aclass="toc-backref"href="#id9"><codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">run</span></code></a><aclass="headerlink"href="#make-run"title="Permalink to this headline">¶</a></h2>
<p>To get up a running a developer instance simply call <codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">run</span></code>. This enables
<em>debug</em> option in <aclass="reference external"href="https://github.com/asciimoo/searx/blob/master/searx/settings.yml">git://searx/settings.yml</a>, starts a <codeclass="docutils literal notranslate"><spanclass="pre">./searx/webapp.py</span></code>
<spanid="id3"></span><h2><aclass="toc-backref"href="#id10"><codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">clean</span></code></a><aclass="headerlink"href="#make-clean"title="Permalink to this headline">¶</a></h2>
<p>Drop all intermediate files, all builds, but keep sources untouched. Includes
target <codeclass="docutils literal notranslate"><spanclass="pre">pyclean</span></code> which drops ./local environment. Before calling <codeclass="docutils literal notranslate"><spanclass="pre">make</span>
<spanclass="pre">clean</span></code> stop all processes using <aclass="reference internal"href="#make-pyenv"><spanclass="std std-ref">Python environment</span></a>.</p>
<divclass="highlight-sh notranslate"><divclass="highlight"><pre><span></span>$ make clean
<spanid="make-docs"></span><h2><aclass="toc-backref"href="#id11"><codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">docs</span><spanclass="pre">docs-live</span><spanclass="pre">docs-clean</span></code></a><aclass="headerlink"href="#make-docs-docs-live-docs-clean"title="Permalink to this headline">¶</a></h2>
<p>We describe the usage of the <codeclass="docutils literal notranslate"><spanclass="pre">doc*</span></code> targets in the <aclass="reference internal"href="contribution_guide.html#contrib-docs"><spanclass="std std-ref">How to contribute /
Documentation</span></a> section. If you want to edit the documentation
read our <aclass="reference internal"href="contribution_guide.html#make-docs-live"><spanclass="std std-ref">live build</span></a> section. If you are working in your own brand,
adjust your <aclass="reference internal"href="#makefile-setup"><spanclass="std std-ref">Makefile setup</span></a>.</p>
<spanid="id4"></span><h2><aclass="toc-backref"href="#id12"><codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">gh-pages</span></code></a><aclass="headerlink"href="#make-gh-pages"title="Permalink to this headline">¶</a></h2>
<p>To deploy on github.io first adjust your <aclass="reference internal"href="#makefile-setup"><spanclass="std std-ref">Makefile setup</span></a>. For any further read <aclass="reference internal"href="contribution_guide.html#deploy-on-github-io"><spanclass="std std-ref">deploy on github.io</span></a>.</p>
<spanid="id5"></span><h2><aclass="toc-backref"href="#id13"><codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">test</span></code></a><aclass="headerlink"href="#make-test"title="Permalink to this headline">¶</a></h2>
<p>Runs a series of tests: <codeclass="docutils literal notranslate"><spanclass="pre">test.pep8</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">test.unit</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">test.robot</span></code> and does
additional <aclass="reference internal"href="#make-pylint"><spanclass="std std-ref">pylint checks</span></a>. You can run tests selective,
<spanid="id6"></span><h2><aclass="toc-backref"href="#id14"><codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">pylint</span></code></a><aclass="headerlink"href="#make-pylint"title="Permalink to this headline">¶</a></h2>
<p>Before commiting its recommend to do some (more) linting. <aclass="reference external"href="https://www.pylint.org/">Pylint</a> is known as
one of the best source-code, bug and quality checker for the Python programming
language. <aclass="reference external"href="https://www.pylint.org/">Pylint</a> is not yet a quality gate within our searx project (like
<aclass="reference internal"href="#make-test"><spanclass="std std-ref">test.pep8</span></a> it is), but <aclass="reference external"href="https://www.pylint.org/">Pylint</a> can help to improve code
quality anyway. The pylint profile we use at searx project is found in
<h2><aclass="toc-backref"href="#id15"><codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">pybuild</span></code></a><aclass="headerlink"href="#make-pybuild"title="Permalink to this headline">¶</a></h2>
<p>Build Python packages in <codeclass="docutils literal notranslate"><spanclass="pre">./dist/py</span></code>.</p>
<divclass="highlight-sh notranslate"><divclass="highlight"><pre><span></span>$ make pybuild
...
BUILD pybuild
running sdist
running egg_info
...
$ ls ./dist/py/
searx-0.15.0-py3-none-any.whl searx-0.15.0.tar.gz
</pre></div>
</div>
<p>To upload packages to <aclass="reference external"href="https://pypi.org/">PyPi</a>, there is also a <codeclass="docutils literal notranslate"><spanclass="pre">upload-pypi</span></code> target. It needs
<aclass="reference external"href="https://twine.readthedocs.io/en/latest/">twine</a> to be installed. Since you are not the owner of <aclass="reference external"href="https://pypi.org/project/searx">PyPi: searx</a> you will