diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-01-27 21:11:58 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-01-27 21:11:58 +0100 |
commit | 14070722c8111a273d3c76af27983a414f939ab1 (patch) | |
tree | 976c7691c0ad9b4d8e9743cdb44af5f058d575bc /guide/single.html | |
parent | Update the feed list (diff) | |
download | python-14070722c8111a273d3c76af27983a414f939ab1.tar.gz python-14070722c8111a273d3c76af27983a414f939ab1.tar.bz2 python-14070722c8111a273d3c76af27983a414f939ab1.zip |
Import the current version of python-guide
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'guide/single.html')
-rw-r--r-- | guide/single.html | 406 |
1 files changed, 406 insertions, 0 deletions
diff --git a/guide/single.html b/guide/single.html new file mode 100644 index 0000000..520dba1 --- /dev/null +++ b/guide/single.html @@ -0,0 +1,406 @@ + +<!DOCTYPE html> + +<html> + <head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" /> + + <title>python-single-r1 — single-impl packages — Gentoo Python Guide documentation</title> + <link rel="stylesheet" type="text/css" href="_static/pygments.css" /> + <link rel="stylesheet" type="text/css" href="_static/alabaster.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/doctools.js"></script> + <link rel="index" title="Index" href="genindex.html" /> + <link rel="search" title="Search" href="search.html" /> + <link rel="next" title="python-r1 — multi-impl packages" href="multi.html" /> + <link rel="prev" title="python-any-r1 — build-time dependency" href="any.html" /> + + <link rel="stylesheet" href="_static/custom.css" type="text/css" /> + + + <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" /> + + </head><body> + + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + + + <div class="body" role="main"> + + <section id="python-single-r1-single-impl-packages"> +<h1>python-single-r1 — single-impl packages<a class="headerlink" href="#python-single-r1-single-impl-packages" title="Permalink to this headline">¶</a></h1> +<p>The <code class="docutils literal notranslate"><span class="pre">python-single-r1</span></code> eclass is used to install single-impl packages. +It is probably the easiest eclass to use, and it is recommended over +<code class="docutils literal notranslate"><span class="pre">python-r1</span></code> whenever multi-impl support would add unnecessary +complexity. However, for packages using distutils or a similar Python +build system, <code class="docutils literal notranslate"><span class="pre">distutils-r1</span></code> eclass should be used instead.</p> +<p>Eclass reference: <a class="reference external" href="https://devmanual.gentoo.org/eclass-reference/python-single-r1.eclass/index.html">python-single-r1.eclass(5)</a></p> +<section id="basic-use-for-unconditional-python"> +<h2>Basic use for unconditional Python<a class="headerlink" href="#basic-use-for-unconditional-python" title="Permalink to this headline">¶</a></h2> +<p>The defining feature of this eclass is that it defines a <code class="docutils literal notranslate"><span class="pre">pkg_setup</span></code> +phase. It normally calls <code class="docutils literal notranslate"><span class="pre">python_setup</span></code> function in order +to determine the interpreter selected by user, and set the global +environment appropriately.</p> +<p>This means that a most trivial package using an autotools-compatible +build system along with unconditional dependency on Python could look +like the following:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span> <span class="c1"># Copyright 1999-2020 Gentoo Authors</span> + <span class="c1"># Distributed under the terms of the GNU General Public License v2</span> + + <span class="nv">EAPI</span><span class="o">=</span><span class="m">7</span> + +<span class="hll"> <span class="nv">PYTHON_COMPAT</span><span class="o">=(</span> python2_7 <span class="o">)</span> +</span><span class="hll"> inherit python-single-r1 +</span> + <span class="nv">DESCRIPTION</span><span class="o">=</span><span class="s2">"Scripts to prepare and plot VOACAP propagation predictions"</span> + <span class="nv">HOMEPAGE</span><span class="o">=</span><span class="s2">"https://www.qsl.net/h/hz1jw//pythonprop/"</span> + <span class="nv">SRC_URI</span><span class="o">=</span><span class="s2">"mirror://sourceforge/</span><span class="si">${</span><span class="nv">PN</span><span class="si">}</span><span class="s2">/</span><span class="si">${</span><span class="nv">P</span><span class="si">}</span><span class="s2">.tar.gz"</span> + + <span class="nv">LICENSE</span><span class="o">=</span><span class="s2">"GPL-2+"</span> + <span class="nv">SLOT</span><span class="o">=</span><span class="s2">"0"</span> + <span class="nv">KEYWORDS</span><span class="o">=</span><span class="s2">"~amd64 ~x86"</span> + <span class="nv">IUSE</span><span class="o">=</span><span class="s2">""</span> +<span class="hll"> <span class="nv">REQUIRED_USE</span><span class="o">=</span><span class="s2">"</span><span class="si">${</span><span class="nv">PYTHON_REQUIRED_USE</span><span class="si">}</span><span class="s2">"</span> +</span> + <span class="nv">RDEPEND</span><span class="o">=</span><span class="s2">"</span> +<span class="hll"><span class="s2"> </span><span class="si">${</span><span class="nv">PYTHON_DEPS</span><span class="si">}</span><span class="s2"></span> +</span><span class="s2"> ...</span> +<span class="s2"> "</span> + <span class="nv">BDEPEND</span><span class="o">=</span><span class="s2">"</span><span class="si">${</span><span class="nv">RDEPEND</span><span class="si">}</span><span class="s2">"</span> +</pre></div> +</div> +<p>This ebuild demonstrates the absolute minimum working code. Only +the four highlighted lines are specific to Python eclasses, plus +the implicitly exported <code class="docutils literal notranslate"><span class="pre">pkg_setup</span></code> phase.</p> +<span class="target" id="index-0"></span><span class="target" id="index-1"></span></section> +<section id="dependencies"> +<span id="index-2"></span><h2>Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this headline">¶</a></h2> +<p>When depending on other Python packages, USE dependencies need to be +declared in order to ensure that the dependencies would be built against +the Python implementation used for the package. The exact dependency +string depends on whether the target package is single-impl +or multi-impl.</p> +<p>When depending on other single-impl packages, the eclass-defined +<code class="docutils literal notranslate"><span class="pre">${PYTHON_SINGLE_USEDEP}</span></code> variable can be used to inject the correct +USE dependency:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nv">RDEPEND</span><span class="o">=</span><span class="s2">"</span> +<span class="s2"> ...</span> +<span class="s2"> dev-python/basemap[</span><span class="si">${</span><span class="nv">PYTHON_SINGLE_USEDEP</span><span class="si">}</span><span class="s2">]</span> +<span class="s2">"</span> +</pre></div> +</div> +<p>When depending on multi-impl packages, a more complex construct must +be used. The <code class="docutils literal notranslate"><span class="pre">python_gen_cond_dep</span></code> generator function is used +to copy the specified dependency template for all supported +implementations, and substitute <code class="docutils literal notranslate"><span class="pre">${PYTHON_USEDEP}</span></code> template inside +it:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nv">RDEPEND</span><span class="o">=</span><span class="s2">"</span> +<span class="s2"> ...</span> +<span class="s2"> </span><span class="k">$(</span>python_gen_cond_dep <span class="s1">'</span> +<span class="s1"> dev-python/matplotlib-python2[gtk2,${PYTHON_USEDEP}]</span> +<span class="s1"> '</span><span class="k">)</span><span class="s2"></span> +<span class="s2">"</span> +</pre></div> +</div> +<p>Please note that in this context, <code class="docutils literal notranslate"><span class="pre">${...}</span></code> is used as a literal +template substitution key, so it must be escaped to prevent bash from +substituting it immediately. In the above example, single quotes +are used for this purpose. When other variables are used, double quotes +with explicit escapes have to be used:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nv">RDEPEND</span><span class="o">=</span><span class="s2">"</span> +<span class="s2"> ...</span> +<span class="s2"> </span><span class="k">$(</span>python_gen_cond_dep <span class="s2">"</span> +<span class="s2"> dev-python/wxpython:</span><span class="si">${</span><span class="nv">WX_GTK_VER</span><span class="si">}</span><span class="s2">[\${PYTHON_USEDEP}]</span> +<span class="s2"> "</span><span class="k">)</span><span class="s2">"</span> +</pre></div> +</div> +<p>As demonstrated above, the USE dependency string can be combined with +other USE dependencies. <code class="docutils literal notranslate"><span class="pre">PYTHON_SINGLE_USEDEP</span></code> can be used both +inside and outside <code class="docutils literal notranslate"><span class="pre">python_gen_cond_dep</span></code>, while <code class="docutils literal notranslate"><span class="pre">PYTHON_USEDEP</span></code> only +inside it.</p> +</section> +<section id="conditional-python-use"> +<h2>Conditional Python use<a class="headerlink" href="#conditional-python-use" title="Permalink to this headline">¶</a></h2> +<p>The examples so far assumed that Python is used unconditionally. +If Python support is conditional to a USE flag, appropriate USE +conditionals need to be used in metadata variables, and <code class="docutils literal notranslate"><span class="pre">pkg_setup</span></code> +needs to be rewritten to call the default implementation conditionally:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span> <span class="c1"># Copyright 1999-2020 Gentoo Authors</span> + <span class="c1"># Distributed under the terms of the GNU General Public License v2</span> + + <span class="nv">EAPI</span><span class="o">=</span><span class="m">6</span> + + <span class="nv">PYTHON_COMPAT</span><span class="o">=(</span> python2_7 <span class="o">)</span> + inherit python-single-r1 + + <span class="nv">DESCRIPTION</span><span class="o">=</span><span class="s2">"Yet more Objects for (High Energy Physics) Data Analysis"</span> + <span class="nv">HOMEPAGE</span><span class="o">=</span><span class="s2">"http://yoda.hepforge.org/"</span> + <span class="nv">SRC_URI</span><span class="o">=</span><span class="s2">"http://www.hepforge.org/archive/</span><span class="si">${</span><span class="nv">PN</span><span class="si">}</span><span class="s2">/</span><span class="si">${</span><span class="nv">P</span><span class="si">}</span><span class="s2">.tar.bz2"</span> + + <span class="nv">LICENSE</span><span class="o">=</span><span class="s2">"GPL-2"</span> + <span class="nv">SLOT</span><span class="o">=</span><span class="s2">"0/</span><span class="si">${</span><span class="nv">PV</span><span class="si">}</span><span class="s2">"</span> + <span class="nv">KEYWORDS</span><span class="o">=</span><span class="s2">"~amd64 ~x86 ~amd64-linux ~x86-linux"</span> +<span class="hll"> <span class="nv">IUSE</span><span class="o">=</span><span class="s2">"python root"</span> +</span><span class="hll"> <span class="nv">REQUIRED_USE</span><span class="o">=</span><span class="s2">"python? ( </span><span class="si">${</span><span class="nv">PYTHON_REQUIRED_USE</span><span class="si">}</span><span class="s2"> )"</span> +</span> + <span class="nv">RDEPEND</span><span class="o">=</span><span class="s2">"</span> +<span class="hll"><span class="s2"> python? ( </span><span class="si">${</span><span class="nv">PYTHON_DEPS</span><span class="si">}</span><span class="s2"> )</span> +</span><span class="hll"><span class="s2"> root? ( sci-physics/root:=[python=,</span><span class="si">${</span><span class="nv">PYTHON_SINGLE_USEDEP</span><span class="si">}</span><span class="s2">] )"</span> +</span> <span class="nv">DEPEND</span><span class="o">=</span><span class="s2">"</span><span class="si">${</span><span class="nv">RDEPEND</span><span class="si">}</span><span class="s2"></span> +<span class="hll"><span class="s2"> python? (</span> +</span><span class="hll"><span class="s2"> </span><span class="k">$(</span>python_gen_cond_dep <span class="s1">'</span> +</span><span class="hll"><span class="s1"> dev-python/cython[${PYTHON_USEDEP}]</span> +</span><span class="hll"><span class="s1"> '</span><span class="k">)</span><span class="s2"></span> +</span><span class="hll"><span class="s2"> )"</span> +</span> + pkg_setup<span class="o">()</span> <span class="o">{</span> +<span class="hll"> use python <span class="o">&&</span> python-single-r1_pkg_setup +</span> <span class="o">}</span> + + src_configure<span class="o">()</span> <span class="o">{</span> + econf <span class="se">\</span> +<span class="hll"> <span class="k">$(</span>use_enable python pyext<span class="k">)</span> <span class="se">\</span> +</span> <span class="k">$(</span>use_enable root<span class="k">)</span> + <span class="o">}</span> +</pre></div> +</div> +</section> +<section id="a-hybrid-build-time-conditional-runtime"> +<h2>A hybrid: build-time + conditional runtime<a class="headerlink" href="#a-hybrid-build-time-conditional-runtime" title="Permalink to this headline">¶</a></h2> +<p>A fairly common pattern is for Python to be required unconditionally +at build time but only conditionally at runtime. This happens e.g. when +the package is calling some helper scripts at build time, and optionally +installing Python bindings. In this case, the build time dependency +is expressed unconditionally, and the runtime dependency is made +USE-conditional:</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span> <span class="c1"># Copyright 1999-2020 Gentoo Authors</span> + <span class="c1"># Distributed under the terms of the GNU General Public License v2</span> + + <span class="nv">EAPI</span><span class="o">=</span><span class="m">6</span> + + <span class="nv">PYTHON_COMPAT</span><span class="o">=(</span> python3_<span class="o">{</span><span class="m">6</span>,7,8<span class="o">}</span> <span class="o">)</span> + <span class="nv">PYTHON_REQ_USE</span><span class="o">=</span><span class="s2">"threads(+)"</span> + + inherit waf-utils python-single-r1 + + <span class="nv">DESCRIPTION</span><span class="o">=</span><span class="s2">"Samba talloc library"</span> + <span class="nv">HOMEPAGE</span><span class="o">=</span><span class="s2">"https://talloc.samba.org/"</span> + <span class="nv">SRC_URI</span><span class="o">=</span><span class="s2">"https://www.samba.org/ftp/</span><span class="si">${</span><span class="nv">PN</span><span class="si">}</span><span class="s2">/</span><span class="si">${</span><span class="nv">P</span><span class="si">}</span><span class="s2">.tar.gz"</span> + + <span class="nv">LICENSE</span><span class="o">=</span><span class="s2">"GPL-3 LGPL-3+ LGPL-2"</span> + <span class="nv">SLOT</span><span class="o">=</span><span class="s2">"0"</span> + <span class="nv">KEYWORDS</span><span class="o">=</span><span class="s2">"~alpha amd64 arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sh ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos ~sparc-solaris ~x64-solaris"</span> +<span class="hll"> <span class="nv">IUSE</span><span class="o">=</span><span class="s2">"+python"</span> +</span><span class="hll"> <span class="nv">REQUIRED_USE</span><span class="o">=</span><span class="s2">"</span><span class="si">${</span><span class="nv">PYTHON_REQUIRED_USE</span><span class="si">}</span><span class="s2">"</span> +</span> + <span class="nv">RDEPEND</span><span class="o">=</span><span class="s2">"</span> +<span class="s2"> ...</span> +<span class="hll"><span class="s2"> python? ( </span><span class="si">${</span><span class="nv">PYTHON_DEPS</span><span class="si">}</span><span class="s2"> )"</span> +</span> <span class="nv">DEPEND</span><span class="o">=</span><span class="s2">"</span><span class="si">${</span><span class="nv">RDEPEND</span><span class="si">}</span><span class="s2"></span> +<span class="s2"> ...</span> +<span class="hll"><span class="s2"> </span><span class="si">${</span><span class="nv">PYTHON_DEPS</span><span class="si">}</span><span class="s2">"</span> +</span> + <span class="nv">WAF_BINARY</span><span class="o">=</span><span class="s2">"</span><span class="si">${</span><span class="nv">S</span><span class="si">}</span><span class="s2">/buildtools/bin/waf"</span> + + src_configure<span class="o">()</span> <span class="o">{</span> + <span class="nb">local</span> <span class="nv">extra_opts</span><span class="o">=(</span> +<span class="hll"> <span class="k">$(</span>usex python <span class="s1">''</span> --disable-python<span class="k">)</span> +</span> <span class="o">)</span> + waf-utils_src_configure <span class="s2">"</span><span class="si">${</span><span class="nv">extra_opts</span><span class="p">[@]</span><span class="si">}</span><span class="s2">"</span> + <span class="o">}</span> +</pre></div> +</div> +<p>Note that eclass-exported <code class="docutils literal notranslate"><span class="pre">pkg_setup</span></code> is used unconditionally here.</p> +</section> +<section id="multiple-use-conditions"> +<h2>Multiple USE conditions<a class="headerlink" href="#multiple-use-conditions" title="Permalink to this headline">¶</a></h2> +<p>Finally, let’s give an example of a package where Python is needed +for two independent conditions. To make it more complex, one of them +applies to build time (tests) while the other to runtime (bindings).</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span> <span class="c1"># Copyright 1999-2020 Gentoo Authors</span> + <span class="c1"># Distributed under the terms of the GNU General Public License v2</span> + + <span class="nv">EAPI</span><span class="o">=</span><span class="m">7</span> + + <span class="nv">PYTHON_COMPAT</span><span class="o">=(</span> python3_<span class="o">{</span><span class="m">6</span>,7,8<span class="o">}</span> <span class="o">)</span> + inherit cmake python-single-r1 + + <span class="nv">DESCRIPTION</span><span class="o">=</span><span class="s2">"Sound design and signal processing system for composition and performance"</span> + <span class="nv">HOMEPAGE</span><span class="o">=</span><span class="s2">"https://csound.github.io/"</span> + <span class="nv">SRC_URI</span><span class="o">=</span><span class="s2">"https://dev.gentoo.org/~fordfrog/distfiles/</span><span class="si">${</span><span class="nv">P</span><span class="si">}</span><span class="s2">-distributable.tar.xz"</span> + + <span class="nv">LICENSE</span><span class="o">=</span><span class="s2">"LGPL-2.1 doc? ( FDL-1.2+ )"</span> + <span class="nv">SLOT</span><span class="o">=</span><span class="s2">"0"</span> + <span class="nv">KEYWORDS</span><span class="o">=</span><span class="s2">"~amd64 ~x86"</span> +<span class="hll"> <span class="nv">IUSE</span><span class="o">=</span><span class="s2">"python test"</span> +</span> <span class="nv">RESTRICT</span><span class="o">=</span><span class="s2">"!test? ( test )"</span> + <span class="nv">REQUIRED_USE</span><span class="o">=</span><span class="s2">"</span> +<span class="hll"><span class="s2"> python? ( </span><span class="si">${</span><span class="nv">PYTHON_REQUIRED_USE</span><span class="si">}</span><span class="s2"> )</span> +</span><span class="hll"><span class="s2"> test? ( </span><span class="si">${</span><span class="nv">PYTHON_REQUIRED_USE</span><span class="si">}</span><span class="s2"> )"</span> +</span> + <span class="nv">BDEPEND</span><span class="o">=</span><span class="s2">"</span> +<span class="s2"> python? ( dev-lang/swig )</span> +<span class="hll"><span class="s2"> test? ( </span><span class="si">${</span><span class="nv">PYTHON_DEPS</span><span class="si">}</span><span class="s2"> )</span> +</span><span class="s2"> "</span> + <span class="nv">RDEPEND</span><span class="o">=</span><span class="s2">"</span> +<span class="hll"><span class="s2"> python? ( </span><span class="si">${</span><span class="nv">PYTHON_DEPS</span><span class="si">}</span><span class="s2"> )</span> +</span><span class="s2"> "</span> + + pkg_setup<span class="o">()</span> <span class="o">{</span> +<span class="hll"> <span class="k">if</span> use python <span class="o">||</span> use <span class="nb">test</span> <span class="p">;</span> <span class="k">then</span> +</span><span class="hll"> python-single-r1_pkg_setup +</span><span class="hll"> <span class="k">fi</span> +</span> <span class="o">}</span> + + src_configure<span class="o">()</span> <span class="o">{</span> + <span class="nb">local</span> <span class="nv">mycmakeargs</span><span class="o">=(</span> +<span class="hll"> -DBUILD_PYTHON_INTERFACE<span class="o">=</span><span class="k">$(</span>usex python<span class="k">)</span> +</span><span class="hll"> -DBUILD_PYTHON_OPCODES<span class="o">=</span><span class="k">$(</span>usex python<span class="k">)</span> +</span> <span class="o">)</span> + + cmake_src_configure + <span class="o">}</span> +</pre></div> +</div> +<p>Please note that in general, the condition in <code class="docutils literal notranslate"><span class="pre">pkg_setup</span></code> must match +the one in <code class="docutils literal notranslate"><span class="pre">REQUIRED_USE</span></code>, and that one is a superset of conditions +used in dependencies.</p> +</section> +<section id="manual-install"> +<h2>Manual install<a class="headerlink" href="#manual-install" title="Permalink to this headline">¶</a></h2> +<p>Some packages do not include Python files in their build systems, +or do not install all of them. In this case, the necessary files +can be installed via one of the installation helpers.</p> +<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span> <span class="c1"># Copyright 1999-2020 Gentoo Authors</span> + <span class="c1"># Distributed under the terms of the GNU General Public License v2</span> + + <span class="nv">EAPI</span><span class="o">=</span><span class="m">6</span> + + <span class="nv">PYTHON_COMPAT</span><span class="o">=(</span> python2_7 <span class="o">)</span> + inherit python-single-r1 + + <span class="nv">DESCRIPTION</span><span class="o">=</span><span class="s2">"Arabic dictionary based on the DICT protocol"</span> + <span class="nv">HOMEPAGE</span><span class="o">=</span><span class="s2">"https://www.arabeyes.org/Duali"</span> + <span class="nv">SRC_URI</span><span class="o">=</span><span class="s2">"mirror://sourceforge/arabeyes/</span><span class="si">${</span><span class="nv">P</span><span class="si">}</span><span class="s2">.tar.bz2"</span> + + <span class="nv">LICENSE</span><span class="o">=</span><span class="s2">"BSD"</span> + <span class="nv">SLOT</span><span class="o">=</span><span class="s2">"0"</span> + <span class="nv">KEYWORDS</span><span class="o">=</span><span class="s2">"~alpha amd64 ~hppa ~ia64 ~mips ~ppc ~sparc x86"</span> + <span class="nv">IUSE</span><span class="o">=</span><span class="s2">""</span> + <span class="nv">REQUIRED_USE</span><span class="o">=</span><span class="s2">"</span><span class="si">${</span><span class="nv">PYTHON_REQUIRED_USE</span><span class="si">}</span><span class="s2">"</span> + + <span class="nv">DEPEND</span><span class="o">=</span><span class="s2">"</span><span class="si">${</span><span class="nv">PYTHON_DEPS</span><span class="si">}</span><span class="s2">"</span> + <span class="nv">RDEPEND</span><span class="o">=</span><span class="s2">"</span><span class="si">${</span><span class="nv">DEPEND</span><span class="si">}</span><span class="s2">"</span> + + src_install<span class="o">()</span> <span class="o">{</span> +<span class="hll"> python_domodule pyduali +</span><span class="hll"> python_doscript duali dict2db trans2arabic arabic2trans +</span> <span class="o">}</span> +</pre></div> +</div> +</section> +</section> + + + </div> + + </div> + </div> + <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> + <div class="sphinxsidebarwrapper"> +<h1 class="logo"><a href="index.html">Gentoo Python Guide</a></h1> + + + + + + + + +<h3>Navigation</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="preface.html">Preface</a></li> +<li class="toctree-l1"><a class="reference internal" href="interpreter.html">Python interpreters</a></li> +<li class="toctree-l1"><a class="reference internal" href="eclass.html">Choosing between Python eclasses</a></li> +<li class="toctree-l1"><a class="reference internal" href="basic.html">Common basics</a></li> +<li class="toctree-l1"><a class="reference internal" href="any.html">python-any-r1 — build-time dependency</a></li> +<li class="toctree-l1 current"><a class="current reference internal" href="#">python-single-r1 — single-impl packages</a><ul> +<li class="toctree-l2"><a class="reference internal" href="#basic-use-for-unconditional-python">Basic use for unconditional Python</a></li> +<li class="toctree-l2"><a class="reference internal" href="#dependencies">Dependencies</a></li> +<li class="toctree-l2"><a class="reference internal" href="#conditional-python-use">Conditional Python use</a></li> +<li class="toctree-l2"><a class="reference internal" href="#a-hybrid-build-time-conditional-runtime">A hybrid: build-time + conditional runtime</a></li> +<li class="toctree-l2"><a class="reference internal" href="#multiple-use-conditions">Multiple USE conditions</a></li> +<li class="toctree-l2"><a class="reference internal" href="#manual-install">Manual install</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="multi.html">python-r1 — multi-impl packages</a></li> +<li class="toctree-l1"><a class="reference internal" href="distutils.html">distutils-r1 — standard Python build systems</a></li> +<li class="toctree-l1"><a class="reference internal" href="distutils-legacy.html">distutils-r1 legacy concepts</a></li> +<li class="toctree-l1"><a class="reference internal" href="helper.html">Common helper functions</a></li> +<li class="toctree-l1"><a class="reference internal" href="depend.html">Advanced dependencies</a></li> +<li class="toctree-l1"><a class="reference internal" href="test.html">Resolving test suite problems</a></li> +<li class="toctree-l1"><a class="reference internal" href="pytest.html">pytest recipes</a></li> +<li class="toctree-l1"><a class="reference internal" href="concept.html">Advanced concepts</a></li> +<li class="toctree-l1"><a class="reference internal" href="expert-multi.html">Expert python-r1 usage</a></li> +<li class="toctree-l1"><a class="reference internal" href="buildsys.html">Integration with build systems written in Python</a></li> +<li class="toctree-l1"><a class="reference internal" href="porting.html">Porting tips</a></li> +<li class="toctree-l1"><a class="reference internal" href="migration.html">Migration guides</a></li> +<li class="toctree-l1"><a class="reference internal" href="package-maintenance.html">Python package maintenance</a></li> +<li class="toctree-l1"><a class="reference internal" href="interpreter-maintenance.html">Maintenance of Python implementations</a></li> +</ul> + +<div class="relations"> +<h3>Related Topics</h3> +<ul> + <li><a href="index.html">Documentation overview</a><ul> + <li>Previous: <a href="any.html" title="previous chapter">python-any-r1 — build-time dependency</a></li> + <li>Next: <a href="multi.html" title="next chapter">python-r1 — multi-impl packages</a></li> + </ul></li> +</ul> +</div> +<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>$('#searchbox').show(0);</script> + + + + + + + + + </div> + </div> + <div class="clearer"></div> + </div> + <div class="footer"> + ©2020, Michał Górny, license: CC BY 4.0. + + | + Powered by <a href="http://sphinx-doc.org/">Sphinx 4.4.0</a> + & <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a> + + | + <a href="_sources/single.rst.txt" + rel="nofollow">Page source</a> + </div> + + + + + </body> +</html>
\ No newline at end of file |