<p>Before looking deeper at the targets, first read about <aclass="reference internal"href="#make-install"><spanclass="std std-ref">Python environment</span></a>.</p>
<p>All relevant build tasks are implemented in <aclass="reference external"href="https://github.com/searx/searx/blob/master/manage.sh">git://manage.sh</a> and for CI or
IDE integration a small <codeclass="docutils literal notranslate"><spanclass="pre">Makefile</span></code> wrapper is available. 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>
<spanid="make-install"></span><h2><aclass="toc-backref"href="#id8">Python environment</a><aclass="headerlink"href="#python-environment"title="Permalink to this headline">¶</a></h2>
<p>We do no longer need to build up the virtualenv manually. Jump into your git
working tree and release a <codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">install</span></code> to get a virtualenv with a
<em>developer install</em> of searx (<aclass="reference external"href="https://github.com/searx/searx/blob/master/setup.py">git://setup.py</a>).</p>
<divclass="highlight-none notranslate"><divclass="highlight"><pre><span></span>$ cd ~/searx-clone
$ make install
PYENV [virtualenv] installing ./requirements*.txt into local/py3
<p>If you release <codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">install</span></code> multiple times the installation will only
rebuild if the sha256 sum of the <em>requirement files</em> fails. With other words:
the check fails if you edit the requirements listed in
<aclass="reference external"href="https://github.com/searx/searx/blob/master/requirements-dev.txt">git://requirements-dev.txt</a> and <aclass="reference external"href="https://github.com/searx/searx/blob/master/requirements.txt">git://requirements.txt</a>).</p>
<divclass="highlight-none notranslate"><divclass="highlight"><pre><span></span>$ make install
<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>
the <aclass="reference external"href="https://github.com/searx/searx/blob/master/setup.py">git://setup.py</a> file, you have to call <aclass="reference internal"href="#make-clean"><spanclass="std std-ref">make clean</span></a>.</p>
<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/searx/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. Before
calling <codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">clean</span></code> stop all processes using <aclass="reference internal"href="#make-install"><spanclass="std std-ref">Python environment</span></a>.</p>
<divclass="highlight-none 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.autobuild</span><spanclass="pre">docs.clean</span></code></a><aclass="headerlink"href="#make-docs-docs-autobuild-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,
<spanid="id4"></span><h2><aclass="toc-backref"href="#id12"><codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">docs.gh-pages</span></code></a><aclass="headerlink"href="#make-docs-gh-pages"title="Permalink to this headline">¶</a></h2>
<p>To deploy on github.io first adjust your <aclass="reference internal"href="../admin/settings.html#settings-global"><spanclass="std std-ref">Global Settings</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: <aclass="reference internal"href="#make-test-pylint"><spanclass="std std-ref">make test.pylint</span></a>, <codeclass="docutils literal notranslate"><spanclass="pre">test.pep8</span></code>, <codeclass="docutils literal notranslate"><spanclass="pre">test.unit</span></code>
and <codeclass="docutils literal notranslate"><spanclass="pre">test.robot</span></code>. You can run tests selective, e.g.:</p>
<divclass="highlight-none notranslate"><divclass="highlight"><pre><span></span>$ make test.pep8 test.unit test.sh
<spanid="id6"></span><h2><aclass="toc-backref"href="#id14"><codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">test.sh</span></code></a><aclass="headerlink"href="#make-test-sh"title="Permalink to this headline">¶</a></h2>
<p><aclass="reference internal"href="../admin/buildhosts.html#sh-lint"><spanclass="std std-ref">Lint shell scripts</span></a> / if you have changed some bash scripting run this test before
<spanid="id7"></span><h2><aclass="toc-backref"href="#id15"><codeclass="docutils literal notranslate"><spanclass="pre">make</span><spanclass="pre">test.pylint</span></code></a><aclass="headerlink"href="#make-test-pylint"title="Permalink to this headline">¶</a></h2>
<p><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. The pylint profile we use at searx project is
found in project’s root folder <aclass="reference external"href="https://github.com/searx/searx/blob/master/.pylintrc">git://.pylintrc</a>.</p>
<spanid="make-search-checker"></span><h2><aclass="toc-backref"href="#id16"><codeclass="docutils literal notranslate"><spanclass="pre">search.checker.{engine</span><spanclass="pre">name}</span></code></a><aclass="headerlink"href="#search-checker-engine-name"title="Permalink to this headline">¶</a></h2>
<h2><aclass="toc-backref"href="#id17"><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-none notranslate"><divclass="highlight"><pre><span></span>$ make pybuild
<p>To upload packages to <aclass="reference external"href="https://pypi.org/">PyPi</a>, there is also a <codeclass="docutils literal notranslate"><spanclass="pre">pypi.upload</span></code> target (to test use
<codeclass="docutils literal notranslate"><spanclass="pre">pypi.upload.test</span></code>). Since you are not the owner of <aclass="reference external"href="https://pypi.org/project/searx">PyPi: searx</a> you will