|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
<html lang="en">
|
|
|
<head>
|
|
|
<meta charset="utf-8" />
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
<title>Makefile — SearXNG Documentation (2023.1.23+522ba9a1)</title>
|
|
|
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
|
|
<link rel="stylesheet" type="text/css" href="../_static/searxng.css" />
|
|
|
<link rel="stylesheet" type="text/css" href="../_static/tabs.css" />
|
|
|
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
|
|
|
<script src="../_static/jquery.js"></script>
|
|
|
<script src="../_static/underscore.js"></script>
|
|
|
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
|
|
<script src="../_static/doctools.js"></script>
|
|
|
<script src="../_static/sphinx_highlight.js"></script>
|
|
|
<link rel="index" title="Index" href="../genindex.html" />
|
|
|
<link rel="search" title="Search" href="../search.html" />
|
|
|
<link rel="next" title="reST primer" href="reST.html" />
|
|
|
<link rel="prev" title="Developing in Linux Containers" href="lxcdev.html" />
|
|
|
</head><body>
|
|
|
<div class="related" role="navigation" aria-label="related navigation">
|
|
|
<h3>Navigation</h3>
|
|
|
<ul>
|
|
|
<li class="right" style="margin-right: 10px">
|
|
|
<a href="../genindex.html" title="General Index"
|
|
|
accesskey="I">index</a></li>
|
|
|
<li class="right" >
|
|
|
<a href="../py-modindex.html" title="Python Module Index"
|
|
|
>modules</a> |</li>
|
|
|
<li class="right" >
|
|
|
<a href="reST.html" title="reST primer"
|
|
|
accesskey="N">next</a> |</li>
|
|
|
<li class="right" >
|
|
|
<a href="lxcdev.html" title="Developing in Linux Containers"
|
|
|
accesskey="P">previous</a> |</li>
|
|
|
<li class="nav-item nav-item-0"><a href="../index.html">SearXNG Documentation (2023.1.23+522ba9a1)</a> »</li>
|
|
|
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Developer documentation</a> »</li>
|
|
|
<li class="nav-item nav-item-this"><a href="">Makefile</a></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
|
|
|
<div class="document">
|
|
|
<div class="documentwrapper">
|
|
|
<div class="bodywrapper">
|
|
|
<div class="body" role="main">
|
|
|
|
|
|
<section id="makefile">
|
|
|
<span id="id1"></span><h1>Makefile<a class="headerlink" href="#makefile" title="Permalink to this heading">¶</a></h1>
|
|
|
<aside class="sidebar">
|
|
|
<p class="sidebar-title">build environment</p>
|
|
|
<p>Before looking deeper at the targets, first read about <a class="reference internal" href="#make-install"><span class="std std-ref">Python environment (make install)</span></a>.</p>
|
|
|
<p>To install system requirements follow <a class="reference internal" href="../admin/buildhosts.html#buildhosts"><span class="std std-ref">Buildhosts</span></a>.</p>
|
|
|
</aside>
|
|
|
<p>All relevant build tasks are implemented in <a class="reference external" href="https://github.com/searxng/searxng/blob/master/manage">git://manage</a> and for CI or
|
|
|
IDE integration a small <code class="docutils literal notranslate"><span class="pre">Makefile</span></code> wrapper is available. If you are not
|
|
|
familiar with Makefiles, we recommend to read <a class="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 <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">{target-name}</span></code> to <em>build</em> a target.
|
|
|
Calling the <code class="docutils literal notranslate"><span class="pre">help</span></code> target gives a first overview (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">help</span></code>):</p>
|
|
|
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>INFO: sourced NVM environment from /home/runner/.nvm
|
|
|
nvm.: use nvm (without dot) to execute nvm commands directly
|
|
|
install : install NVM locally at /home/runner/work/searxng/searxng/.nvm
|
|
|
clean : remove NVM installation
|
|
|
status : prompt some status informations about nvm & node
|
|
|
nodejs : install Node.js latest LTS
|
|
|
cmd ... : run command ... in NVM environment
|
|
|
bash : start bash interpreter with NVM environment sourced
|
|
|
buildenv:
|
|
|
rebuild ./utils/brand.env
|
|
|
webapp.:
|
|
|
run : run developer instance
|
|
|
weblate.:
|
|
|
push.translations: push translation changes from SearXNG to Weblate's counterpart
|
|
|
to.translations: Update 'translations' branch with last additions from Weblate.
|
|
|
data.:
|
|
|
all : update searx/languages.py and ./data/*
|
|
|
languages : update searx/data/engines_languages.json & searx/languages.py
|
|
|
useragents: update searx/data/useragents.json with the most recent versions of Firefox.
|
|
|
docs.:
|
|
|
html : build HTML documentation
|
|
|
live : autobuild HTML documentation while editing
|
|
|
gh-pages : deploy on gh-pages branch
|
|
|
prebuild : build reST include files (./build/docs/includes)
|
|
|
clean : clean documentation build
|
|
|
docker.:
|
|
|
build : build docker image
|
|
|
push : build and push docker image
|
|
|
gecko.driver:
|
|
|
download & install geckodriver if not already installed (required for
|
|
|
robot_tests)
|
|
|
redis:
|
|
|
build : build redis binaries at /home/runner/work/searxng/searxng/dist/redis/6.2.6/amd64
|
|
|
install : create user (searxng-redis) and install systemd service (searxng-redis)
|
|
|
help : show more redis commands
|
|
|
node.:
|
|
|
env : download & install npm dependencies locally
|
|
|
clean : drop locally npm installations
|
|
|
py.:
|
|
|
build : Build python packages at ./dist
|
|
|
clean : delete virtualenv and intermediate py files
|
|
|
pyenv.:
|
|
|
install : developer install of SearXNG into virtualenv
|
|
|
uninstall : uninstall developer installation
|
|
|
cmd ... : run command ... in virtualenv
|
|
|
OK : test if virtualenv is OK
|
|
|
pypi.upload:
|
|
|
Upload python packages to PyPi (to test use pypi.upload.test)
|
|
|
format.:
|
|
|
python : format Python code source using black
|
|
|
test.:
|
|
|
yamllint : lint YAML files (YAMLLINT_FILES)
|
|
|
pylint : lint PYLINT_FILES, searx/engines, searx & tests
|
|
|
pyright : static type check of python sources
|
|
|
black : check black code format
|
|
|
unit : run unit tests
|
|
|
coverage : run unit tests with coverage
|
|
|
robot : run robot test
|
|
|
rst : test .rst files incl. README.rst
|
|
|
clean : clean intermediate test stuff
|
|
|
themes.:
|
|
|
all : build all themes
|
|
|
simple : build simple theme
|
|
|
pygments.:
|
|
|
less : build LESS files for pygments
|
|
|
go.:
|
|
|
ls : list golang binary archives (stable)
|
|
|
golang : (re-) install golang binary in user's $HOME/local folder
|
|
|
install : install go package in user's $HOME/go-apps folder
|
|
|
bash : start bash interpreter with golang environment sourced
|
|
|
static.build.: [build] /static
|
|
|
commit : build & commit /static folder
|
|
|
drop : drop last commit if it was previously done by static.build.commit
|
|
|
restore : git restore of the /static folder (after themes.all)
|
|
|
environment ...
|
|
|
SEARXNG_REDIS_URL :
|
|
|
----
|
|
|
run - run developer instance
|
|
|
install - developer install of SearxNG into virtualenv
|
|
|
uninstall - uninstall developer installation
|
|
|
clean - clean up working tree
|
|
|
search.checker - check search engines
|
|
|
test - run shell & CI tests
|
|
|
test.shell - test shell scripts
|
|
|
ci.test - run CI tests
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<nav class="contents local" id="contents">
|
|
|
<p class="topic-title">Contents</p>
|
|
|
<ul class="simple">
|
|
|
<li><p><a class="reference internal" href="#python-environment-make-install" id="id10">Python environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>)</a></p></li>
|
|
|
<li><p><a class="reference internal" href="#make-buildenv" id="id11"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">buildenv</span></code></a></p></li>
|
|
|
<li><p><a class="reference internal" href="#node-js-environment-make-node-env" id="id12">Node.js environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">node.env</span></code>)</a></p></li>
|
|
|
<li><p><a class="reference internal" href="#make-nvm-nodejs" id="id13"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.nodejs</span></code></a></p></li>
|
|
|
<li><p><a class="reference internal" href="#make-run" id="id14"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a></p></li>
|
|
|
<li><p><a class="reference internal" href="#make-clean" id="id15"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a></p></li>
|
|
|
<li><p><a class="reference internal" href="#make-docs-docs-autobuild-docs-clean" id="id16"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs.autobuild</span> <span class="pre">docs.clean</span></code></a></p></li>
|
|
|
<li><p><a class="reference internal" href="#make-docs-gh-pages" id="id17"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.gh-pages</span></code></a></p></li>
|
|
|
<li><p><a class="reference internal" href="#make-test" id="id18"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a></p></li>
|
|
|
<li><p><a class="reference internal" href="#make-test-shell" id="id19"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.shell</span></code></a></p></li>
|
|
|
<li><p><a class="reference internal" href="#make-test-pylint" id="id20"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.pylint</span></code></a></p></li>
|
|
|
<li><p><a class="reference internal" href="#search-checker-engine-name" id="id21"><code class="docutils literal notranslate"><span class="pre">search.checker.{engine</span> <span class="pre">name}</span></code></a></p></li>
|
|
|
</ul>
|
|
|
</nav>
|
|
|
<section id="python-environment-make-install">
|
|
|
<span id="make-install"></span><h2><a class="toc-backref" href="#id10" role="doc-backlink">Python environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code>)</a><a class="headerlink" href="#python-environment-make-install" title="Permalink to this heading">¶</a></h2>
|
|
|
<aside class="sidebar">
|
|
|
<p class="sidebar-title">activate environment</p>
|
|
|
<p><code class="docutils literal notranslate"><span class="pre">source</span> <span class="pre">./local/py3/bin/activate</span></code></p>
|
|
|
</aside>
|
|
|
<p>We do no longer need to build up the virtualenv manually. Jump into your git
|
|
|
working tree and release a <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">install</span></code> to get a virtualenv with a
|
|
|
<em>developer install</em> of SearXNG (<a class="reference external" href="https://github.com/searxng/searxng/blob/master/setup.py">git://setup.py</a>).</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ cd ~/searxng-clone
|
|
|
$ make install
|
|
|
PYENV [virtualenv] installing ./requirements*.txt into local/py3
|
|
|
...
|
|
|
PYENV OK
|
|
|
PYENV [install] pip install -e 'searx[test]'
|
|
|
...
|
|
|
Successfully installed argparse-1.4.0 searx
|
|
|
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
|
|
|
BUILDENV INFO:searx:Initialisation done
|
|
|
BUILDENV build utils/brand.env
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<p>If you release <code class="docutils literal notranslate"><span class="pre">make</span> <span class="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
|
|
|
<a class="reference external" href="https://github.com/searxng/searxng/blob/master/requirements-dev.txt">git://requirements-dev.txt</a> and <a class="reference external" href="https://github.com/searxng/searxng/blob/master/requirements.txt">git://requirements.txt</a>).</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make install
|
|
|
PYENV OK
|
|
|
PYENV [virtualenv] requirements.sha256 failed
|
|
|
[virtualenv] - 6cea6eb6def9e14a18bf32f8a3e... ./requirements-dev.txt
|
|
|
[virtualenv] - 471efef6c73558e391c3adb35f4... ./requirements.txt
|
|
|
...
|
|
|
PYENV [virtualenv] installing ./requirements*.txt into local/py3
|
|
|
...
|
|
|
PYENV OK
|
|
|
PYENV [install] pip install -e 'searx[test]'
|
|
|
...
|
|
|
Successfully installed argparse-1.4.0 searx
|
|
|
BUILDENV INFO:searx:load the default settings from ./searx/settings.yml
|
|
|
BUILDENV INFO:searx:Initialisation done
|
|
|
BUILDENV build utils/brand.env
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<aside class="sidebar">
|
|
|
<p class="sidebar-title">drop environment</p>
|
|
|
<p>To get rid of the existing environment before re-build use <a class="reference internal" href="#make-clean"><span class="std std-ref">clean target</span></a> first.</p>
|
|
|
</aside>
|
|
|
<p>If you think, something goes wrong with your ./local environment or you change
|
|
|
the <a class="reference external" href="https://github.com/searxng/searxng/blob/master/setup.py">git://setup.py</a> file, you have to call <a class="reference internal" href="#make-clean"><span class="std std-ref">make clean</span></a>.</p>
|
|
|
</section>
|
|
|
<section id="make-buildenv">
|
|
|
<span id="id2"></span><h2><a class="toc-backref" href="#id11" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">buildenv</span></code></a><a class="headerlink" href="#make-buildenv" title="Permalink to this heading">¶</a></h2>
|
|
|
<p>Rebuild instance’s environment with the modified settings from the
|
|
|
<a class="reference internal" href="../admin/engines/settings.html#settings-brand"><span class="std std-ref">brand:</span></a> and <a class="reference internal" href="../admin/engines/settings.html#settings-server"><span class="std std-ref">server:</span></a> section of your
|
|
|
<a class="reference internal" href="../admin/engines/settings.html#settings-location"><span class="std std-ref">settings.yml</span></a>.</p>
|
|
|
<p>We have all SearXNG setups are centralized in the <a class="reference internal" href="../admin/engines/settings.html#settings-yml"><span class="std std-ref">settings.yml</span></a> file.
|
|
|
This setup is available as long we are in a <em>installed instance</em>. E.g. the
|
|
|
<em>installed instance</em> on the server or the <em>installed developer instance</em> at
|
|
|
<code class="docutils literal notranslate"><span class="pre">./local</span></code> (the later one is created by a <a class="reference internal" href="#make-install"><span class="std std-ref">make install</span></a> or <a class="reference internal" href="#make-run"><span class="std std-ref">make run</span></a>).</p>
|
|
|
<p>Tasks running outside of an <em>installed instance</em>, especially those tasks and
|
|
|
scripts running at (pre-) installation time do not have access to the SearXNG
|
|
|
setup (from a <em>installed instance</em>). Those tasks need a <em>build environment</em>.</p>
|
|
|
<p>The <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">buildenv</span></code> target will update the <em>build environment</em> in:</p>
|
|
|
<ul class="simple">
|
|
|
<li><p><a class="reference external" href="https://github.com/searxng/searxng/blob/master/utils/brand.env">git://utils/brand.env</a></p></li>
|
|
|
</ul>
|
|
|
<p>Tasks running outside of an <em>installed instance</em>, need the following settings
|
|
|
from the YAML configuration:</p>
|
|
|
<ul class="simple">
|
|
|
<li><p><code class="docutils literal notranslate"><span class="pre">SEARXNG_URL</span></code> from <a class="reference internal" href="../admin/engines/settings.html#settings-server"><span class="std std-ref">server.base_url</span></a> (aka
|
|
|
<code class="docutils literal notranslate"><span class="pre">PUBLIC_URL</span></code>)</p></li>
|
|
|
<li><p><code class="docutils literal notranslate"><span class="pre">SEARXNG_BIND_ADDRESS</span></code> from <a class="reference internal" href="../admin/engines/settings.html#settings-server"><span class="std std-ref">server.bind_address</span></a></p></li>
|
|
|
<li><p><code class="docutils literal notranslate"><span class="pre">SEARXNG_PORT</span></code> from <a class="reference internal" href="../admin/engines/settings.html#settings-server"><span class="std std-ref">server.port</span></a></p></li>
|
|
|
</ul>
|
|
|
</section>
|
|
|
<section id="node-js-environment-make-node-env">
|
|
|
<span id="make-node-env"></span><h2><a class="toc-backref" href="#id12" role="doc-backlink">Node.js environment (<code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">node.env</span></code>)</a><a class="headerlink" href="#node-js-environment-make-node-env" title="Permalink to this heading">¶</a></h2>
|
|
|
<p><a class="reference external" href="https://nodejs.org/">Node.js</a> version 16.13.0 or higher is required to build the themes.
|
|
|
If the requirement is not met, the build chain uses <a class="reference external" href="https://github.com/nvm-sh">nvm</a> (Node Version
|
|
|
Manager) to install latest LTS of <a class="reference external" href="https://nodejs.org/">Node.js</a> locally: there is no need to
|
|
|
install <a class="reference external" href="https://github.com/nvm-sh">nvm</a> or <a class="reference external" href="https://www.npmjs.com/">npm</a> on your system.</p>
|
|
|
<p>Use <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.status</span></code> to get the current status of you <a class="reference external" href="https://nodejs.org/">Node.js</a> and <a class="reference external" href="https://github.com/nvm-sh">nvm</a> setup.</p>
|
|
|
<p>Here is the output you will typically get on a Ubuntu 20.04 system which serves
|
|
|
only a <a class="reference external" href="https://nodejs.org/en/about/releases/">no longer active</a> Release
|
|
|
<a class="reference external" href="https://packages.ubuntu.com/focal/nodejs">Node.js v10.19.0</a>.</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make nvm.status
|
|
|
INFO: Node.js is installed at /usr/bin/node
|
|
|
INFO: Node.js is version v10.19.0
|
|
|
WARN: minimal Node.js version is 16.13.0
|
|
|
INFO: npm is installed at /usr/bin/npm
|
|
|
INFO: npm is version 6.14.4
|
|
|
WARN: NVM is not installed
|
|
|
INFO: to install NVM and Node.js (LTS) use: manage nvm install --lts
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<p>To install you can also use <a class="reference internal" href="#make-nvm-nodejs"><span class="std std-ref">make nvm.nodejs</span></a></p>
|
|
|
</section>
|
|
|
<section id="make-nvm-nodejs">
|
|
|
<span id="id3"></span><h2><a class="toc-backref" href="#id13" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">nvm.nodejs</span></code></a><a class="headerlink" href="#make-nvm-nodejs" title="Permalink to this heading">¶</a></h2>
|
|
|
<p>Install latest <a class="reference external" href="https://nodejs.org/">Node.js</a> LTS locally (uses <a class="reference external" href="https://github.com/nvm-sh">nvm</a>):</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make nvm.nodejs
|
|
|
INFO: install (update) NVM at /share/searxng/.nvm
|
|
|
INFO: clone: https://github.com/nvm-sh/nvm.git
|
|
|
...
|
|
|
Downloading and installing node v16.13.0...
|
|
|
...
|
|
|
INFO: Node.js is installed at searxng/.nvm/versions/node/v16.13.0/bin/node
|
|
|
INFO: Node.js is version v16.13.0
|
|
|
INFO: npm is installed at searxng/.nvm/versions/node/v16.13.0/bin/npm
|
|
|
INFO: npm is version 8.1.0
|
|
|
INFO: NVM is installed at searxng/.nvm
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
</section>
|
|
|
<section id="make-run">
|
|
|
<span id="id4"></span><h2><a class="toc-backref" href="#id14" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code></a><a class="headerlink" href="#make-run" title="Permalink to this heading">¶</a></h2>
|
|
|
<p>To get up a running a developer instance simply call <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">run</span></code>. This enables
|
|
|
<em>debug</em> option in <a class="reference external" href="https://github.com/searxng/searxng/blob/master/searx/settings.yml">git://searx/settings.yml</a>, starts a <code class="docutils literal notranslate"><span class="pre">./searx/webapp.py</span></code>
|
|
|
instance and opens the URL in your favorite WEB browser (<a class="reference external" href="https://manpages.debian.org/jump?q=xdg-open">xdg-open</a>):</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make run
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<p>Changes to theme’s HTML templates (jinja2) are instant. Changes to the CSS & JS
|
|
|
sources of the theme need to be rebuild. You can do that by running:</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make themes.all
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<p>Alternatively to <code class="docutils literal notranslate"><span class="pre">themes.all</span></code> you can run <em>live builds</em> of the theme you are
|
|
|
modify:</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ LIVE_THEME=simple make run
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
</section>
|
|
|
<section id="make-clean">
|
|
|
<span id="id5"></span><h2><a class="toc-backref" href="#id15" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code></a><a class="headerlink" href="#make-clean" title="Permalink to this heading">¶</a></h2>
|
|
|
<p>Drops all intermediate files, all builds, but keep sources untouched. Before
|
|
|
calling <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">clean</span></code> stop all processes using the <a class="reference internal" href="#make-install"><span class="std std-ref">Python environment (make install)</span></a> or
|
|
|
<a class="reference internal" href="#make-node-env"><span class="std std-ref">Node.js environment (make node.env)</span></a>.</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make clean
|
|
|
CLEAN pyenv
|
|
|
PYENV [virtualenv] drop local/py3
|
|
|
CLEAN docs -- build/docs dist/docs
|
|
|
CLEAN themes -- locally installed npm dependencies
|
|
|
...
|
|
|
CLEAN test stuff
|
|
|
CLEAN common files
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
</section>
|
|
|
<section id="make-docs-docs-autobuild-docs-clean">
|
|
|
<span id="make-docs"></span><h2><a class="toc-backref" href="#id16" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs</span> <span class="pre">docs.autobuild</span> <span class="pre">docs.clean</span></code></a><a class="headerlink" href="#make-docs-docs-autobuild-docs-clean" title="Permalink to this heading">¶</a></h2>
|
|
|
<p>We describe the usage of the <code class="docutils literal notranslate"><span class="pre">doc.*</span></code> targets in the <a class="reference internal" href="contribution_guide.html#contrib-docs"><span class="std std-ref">How to contribute /
|
|
|
Documentation</span></a> section. If you want to edit the documentation
|
|
|
read our <a class="reference internal" href="contribution_guide.html#make-docs-live"><span class="std std-ref">live build</span></a> section. If you are working in your own brand,
|
|
|
adjust your <a class="reference internal" href="../admin/engines/settings.html#settings-global"><span class="std std-ref">Global Settings</span></a>.</p>
|
|
|
</section>
|
|
|
<section id="make-docs-gh-pages">
|
|
|
<span id="id6"></span><h2><a class="toc-backref" href="#id17" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">docs.gh-pages</span></code></a><a class="headerlink" href="#make-docs-gh-pages" title="Permalink to this heading">¶</a></h2>
|
|
|
<p>To deploy on github.io first adjust your <a class="reference internal" href="../admin/engines/settings.html#settings-global"><span class="std std-ref">Global Settings</span></a>. For any
|
|
|
further read <a class="reference internal" href="contribution_guide.html#deploy-on-github-io"><span class="std std-ref">deploy on github.io</span></a>.</p>
|
|
|
</section>
|
|
|
<section id="make-test">
|
|
|
<span id="id7"></span><h2><a class="toc-backref" href="#id18" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test</span></code></a><a class="headerlink" href="#make-test" title="Permalink to this heading">¶</a></h2>
|
|
|
<p>Runs a series of tests: <a class="reference internal" href="#make-test-pylint"><span class="std std-ref">make test.pylint</span></a>, <code class="docutils literal notranslate"><span class="pre">test.pep8</span></code>, <code class="docutils literal notranslate"><span class="pre">test.unit</span></code>
|
|
|
and <code class="docutils literal notranslate"><span class="pre">test.robot</span></code>. You can run tests selective, e.g.:</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ make test.pep8 test.unit test.sh
|
|
|
TEST test.pep8 OK
|
|
|
...
|
|
|
TEST test.unit OK
|
|
|
...
|
|
|
TEST test.sh OK
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
</section>
|
|
|
<section id="make-test-shell">
|
|
|
<span id="id8"></span><h2><a class="toc-backref" href="#id19" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.shell</span></code></a><a class="headerlink" href="#make-test-shell" title="Permalink to this heading">¶</a></h2>
|
|
|
<p><a class="reference internal" href="../admin/buildhosts.html#sh-lint"><span class="std std-ref">Lint shell scripts</span></a> / if you have changed some bash scripting run this test before
|
|
|
commit.</p>
|
|
|
</section>
|
|
|
<section id="make-test-pylint">
|
|
|
<span id="id9"></span><h2><a class="toc-backref" href="#id20" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">test.pylint</span></code></a><a class="headerlink" href="#make-test-pylint" title="Permalink to this heading">¶</a></h2>
|
|
|
<p><a class="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 used in the SearXNG project is
|
|
|
found in project’s root folder <a class="reference external" href="https://github.com/searxng/searxng/blob/master/.pylintrc">git://.pylintrc</a>.</p>
|
|
|
</section>
|
|
|
<section id="search-checker-engine-name">
|
|
|
<span id="make-search-checker"></span><h2><a class="toc-backref" href="#id21" role="doc-backlink"><code class="docutils literal notranslate"><span class="pre">search.checker.{engine</span> <span class="pre">name}</span></code></a><a class="headerlink" href="#search-checker-engine-name" title="Permalink to this heading">¶</a></h2>
|
|
|
<p>To check all engines:</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">search</span><span class="o">.</span><span class="n">checker</span>
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<p>To check a engine with whitespace in the name like <em>google news</em> replace space
|
|
|
by underline:</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">search</span><span class="o">.</span><span class="n">checker</span><span class="o">.</span><span class="n">google_news</span>
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<p>To see HTTP requests and more use SEARXNG_DEBUG:</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">SEARXNG_DEBUG</span><span class="o">=</span><span class="mi">1</span> <span class="n">search</span><span class="o">.</span><span class="n">checker</span><span class="o">.</span><span class="n">google_news</span>
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
<p>To filter out HTTP redirects (<a class="reference external" href="https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_redirection">3xx</a>):</p>
|
|
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">SEARXNG_DEBUG</span><span class="o">=</span><span class="mi">1</span> <span class="n">search</span><span class="o">.</span><span class="n">checker</span><span class="o">.</span><span class="n">google_news</span> <span class="o">|</span> <span class="n">grep</span> <span class="o">-</span><span class="n">A1</span> <span class="s2">"HTTP/1.1</span><span class="se">\"</span><span class="s2"> 3[0-9][0-9]"</span>
|
|
|
<span class="o">...</span>
|
|
|
<span class="n">Engine</span> <span class="n">google</span> <span class="n">news</span> <span class="n">Checking</span>
|
|
|
<span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">news</span><span class="o">.</span><span class="n">google</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="mi">443</span> <span class="s2">"GET /search?q=life&hl=en&lr=lang_en&ie=utf8&oe=utf8&ceid=US%3Aen&gl=US HTTP/1.1"</span> <span class="mi">302</span> <span class="mi">0</span>
|
|
|
<span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">news</span><span class="o">.</span><span class="n">google</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="mi">443</span> <span class="s2">"GET /search?q=life&hl=en-US&lr=lang_en&ie=utf8&oe=utf8&ceid=US:en&gl=US HTTP/1.1"</span> <span class="mi">200</span> <span class="kc">None</span>
|
|
|
<span class="o">--</span>
|
|
|
<span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">news</span><span class="o">.</span><span class="n">google</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="mi">443</span> <span class="s2">"GET /search?q=computer&hl=en&lr=lang_en&ie=utf8&oe=utf8&ceid=US%3Aen&gl=US HTTP/1.1"</span> <span class="mi">302</span> <span class="mi">0</span>
|
|
|
<span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">news</span><span class="o">.</span><span class="n">google</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="mi">443</span> <span class="s2">"GET /search?q=computer&hl=en-US&lr=lang_en&ie=utf8&oe=utf8&ceid=US:en&gl=US HTTP/1.1"</span> <span class="mi">200</span> <span class="kc">None</span>
|
|
|
<span class="o">--</span>
|
|
|
</pre></div>
|
|
|
</div>
|
|
|
</section>
|
|
|
</section>
|
|
|
|
|
|
|
|
|
<div class="clearer"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<span id="sidebar-top"></span>
|
|
|
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
|
|
<div class="sphinxsidebarwrapper">
|
|
|
|
|
|
|
|
|
<p class="logo"><a href="../index.html">
|
|
|
<img class="logo" src="../_static/searxng-wordmark.svg" alt="Logo"/>
|
|
|
</a></p>
|
|
|
|
|
|
|
|
|
<h3><a href="../index.html">Table of Contents</a></h3>
|
|
|
<p class="caption" role="heading"><span class="caption-text">Contents</span></p>
|
|
|
<ul class="current">
|
|
|
<li class="toctree-l1"><a class="reference internal" href="../user/index.html">User information</a></li>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="../own-instance.html">Why use a private instance?</a></li>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="../admin/index.html">Administrator documentation</a></li>
|
|
|
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Developer documentation</a><ul class="current">
|
|
|
<li class="toctree-l2"><a class="reference internal" href="quickstart.html">Development Quickstart</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="contribution_guide.html">How to contribute</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="engine_overview.html">Engine Overview</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="offline_engines.html">Offline Engines</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="search_api.html">Search API</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="plugins.html">Plugins</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="translation.html">Translation</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="lxcdev.html">Developing in Linux Containers</a></li>
|
|
|
<li class="toctree-l2 current"><a class="current reference internal" href="#">Makefile</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="reST.html">reST primer</a></li>
|
|
|
<li class="toctree-l2"><a class="reference internal" href="searxng_extra/index.html">Tooling box <code class="docutils literal notranslate"><span class="pre">searxng_extra</span></code></a></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="../utils/index.html">DevOps tooling box</a></li>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="../src/index.html">Source-Code</a></li>
|
|
|
<li class="toctree-l1"><a class="reference internal" href="../donate.html">Donate to searxng.org</a></li>
|
|
|
</ul>
|
|
|
|
|
|
<h3>Project Links</h3>
|
|
|
<ul>
|
|
|
<li><a href="https://github.com/searxng/searxng/tree/master">Source</a>
|
|
|
|
|
|
<li><a href="https://github.com/searxng/searxng/wiki">Wiki</a>
|
|
|
|
|
|
<li><a href="https://searx.space">Public instances</a>
|
|
|
|
|
|
<li><a href="https://github.com/searxng/searxng/issues">Issue Tracker</a>
|
|
|
</ul><h3>Navigation</h3>
|
|
|
<ul>
|
|
|
<li><a href="../index.html">Overview</a>
|
|
|
<ul>
|
|
|
<li><a href="index.html">Developer documentation</a>
|
|
|
<ul>
|
|
|
<li>Previous: <a href="lxcdev.html" title="previous chapter">Developing in Linux Containers</a>
|
|
|
<li>Next: <a href="reST.html" title="next chapter">reST primer</a></ul>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div id="searchbox" style="display: none" role="search">
|
|
|
<h3 id="searchlabel">Quick search</h3>
|
|
|
<div class="searchformwrapper">
|
|
|
<form class="search" action="../search.html" method="get">
|
|
|
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
|
|
<input type="submit" value="Go" />
|
|
|
</form>
|
|
|
</div>
|
|
|
</div>
|
|
|
<script>document.getElementById('searchbox').style.display = "block"</script>
|
|
|
<div role="note" aria-label="source link">
|
|
|
<h3>This Page</h3>
|
|
|
<ul class="this-page-menu">
|
|
|
<li><a href="../_sources/dev/makefile.rst.txt"
|
|
|
rel="nofollow">Show Source</a></li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="clearer"></div>
|
|
|
</div>
|
|
|
|
|
|
<div class="footer" role="contentinfo">
|
|
|
© Copyright 2021 SearXNG team, 2015-2021 Adam Tauber, Noémi Ványi.
|
|
|
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 5.3.0.
|
|
|
</div>
|
|
|
<script src="../_static/version_warning_offset.js"></script>
|
|
|
|
|
|
</body>
|
|
|
</html> |