summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-10-23 16:22:53 +0200
committerMichał Górny <mgorny@gentoo.org>2024-10-23 16:22:53 +0200
commita657d3d73dfa6868291423373558289fc70cd587 (patch)
treea8c6d06597edba597ba60969dffe8e8f2952a656 /guide/depend.html
parentUpdate the Guide to fb7670e3dbcab670954c050e5cd42ba8133bf140 (diff)
downloadpython-a657d3d73dfa6868291423373558289fc70cd587.tar.gz
python-a657d3d73dfa6868291423373558289fc70cd587.tar.bz2
python-a657d3d73dfa6868291423373558289fc70cd587.zip
Update Guide to b8616ab
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'guide/depend.html')
-rw-r--r--guide/depend.html51
1 files changed, 29 insertions, 22 deletions
diff --git a/guide/depend.html b/guide/depend.html
index 34d62c5..52ab737 100644
--- a/guide/depend.html
+++ b/guide/depend.html
@@ -45,14 +45,15 @@ to enforce the matching flag via a USE dependency.</p>
<p>In order to create a USE dependency on the Python interpreter, set
<code class="docutils literal notranslate"><span class="pre">PYTHON_REQ_USE</span></code> before inheriting the eclass. This will cause
the eclass to generate appropriate dependency string in <code class="docutils literal notranslate"><span class="pre">PYTHON_DEPS</span></code>.</p>
-<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="w"> </span><span class="c1"># Copyright 1999-2020 Gentoo Authors</span>
+<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="w"> </span><span class="c1"># Copyright 1999-2024 Gentoo Authors</span>
<span class="w"> </span><span class="c1"># Distributed under the terms of the GNU General Public License v2</span>
-<span class="w"> </span><span class="nv">EAPI</span><span class="o">=</span><span class="m">7</span>
+<span class="w"> </span><span class="nv">EAPI</span><span class="o">=</span><span class="m">8</span>
-<span class="w"> </span><span class="nv">PYTHON_COMPAT</span><span class="o">=(</span><span class="w"> </span>python3_6<span class="w"> </span><span class="o">)</span>
+<span class="w"> </span><span class="nv">PYTHON_COMPAT</span><span class="o">=(</span><span class="w"> </span>python3_12<span class="w"> </span><span class="o">)</span>
<span class="hll"><span class="w"> </span><span class="nv">PYTHON_REQ_USE</span><span class="o">=</span><span class="s2">&quot;sqlite&quot;</span>
-</span><span class="w"> </span>inherit<span class="w"> </span>python-r1<span class="w"> </span>gnome2-utils<span class="w"> </span>meson<span class="w"> </span>xdg-utils
+</span>
+<span class="w"> </span>inherit<span class="w"> </span>python-r1<span class="w"> </span>gnome2-utils<span class="w"> </span>meson<span class="w"> </span>xdg-utils
<span class="w"> </span><span class="nv">DESCRIPTION</span><span class="o">=</span><span class="s2">&quot;Modern music player for GNOME&quot;</span>
<span class="w"> </span><span class="nv">HOMEPAGE</span><span class="o">=</span><span class="s2">&quot;https://wiki.gnome.org/Apps/Lollypop&quot;</span>
@@ -61,7 +62,7 @@ the eclass to generate appropriate dependency string in <code class="docutils li
<span class="w"> </span><span class="nv">LICENSE</span><span class="o">=</span><span class="s2">&quot;GPL-3&quot;</span>
<span class="w"> </span><span class="nv">SLOT</span><span class="o">=</span><span class="s2">&quot;0&quot;</span>
-<span class="w"> </span><span class="nv">REQUIRED_USE</span><span class="o">=</span><span class="si">${</span><span class="nv">PYTHON_REQUIRED_USE</span><span class="si">}</span>
+<span class="w"> </span><span class="nv">REQUIRED_USE</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">PYTHON_REQUIRED_USE</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="w"> </span><span class="nv">DEPEND</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">PYTHON_DEPS</span><span class="si">}</span>
<span class="s2"> ...&quot;</span>
@@ -69,18 +70,23 @@ the eclass to generate appropriate dependency string in <code class="docutils li
</div>
<p>Full USE dependency syntax is permitted. For example, you can make
the dependency conditional to a flag on the package:</p>
-<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="w"> </span><span class="c1"># Copyright 1999-2020 Gentoo Authors</span>
+<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="w"> </span><span class="c1"># Copyright 1999-2024 Gentoo Authors</span>
<span class="w"> </span><span class="c1"># Distributed under the terms of the GNU General Public License v2</span>
-<span class="w"> </span><span class="nv">EAPI</span><span class="o">=</span><span class="m">6</span>
+<span class="w"> </span><span class="nv">EAPI</span><span class="o">=</span><span class="m">8</span>
-<span class="w"> </span><span class="nv">PYTHON_COMPAT</span><span class="o">=(</span><span class="w"> </span>python3_6<span class="w"> </span><span class="o">)</span>
+<span class="w"> </span><span class="nv">DISTUTILS_USE_PEP517</span><span class="o">=</span>setuptools
+<span class="w"> </span><span class="nv">PYTHON_COMPAT</span><span class="o">=(</span><span class="w"> </span>python3_12<span class="w"> </span><span class="o">)</span>
<span class="hll"><span class="w"> </span><span class="nv">PYTHON_REQ_USE</span><span class="o">=</span><span class="s2">&quot;sqlite?&quot;</span>
-</span><span class="w"> </span>inherit<span class="w"> </span>distutils-r1
+</span>
+<span class="w"> </span>inherit<span class="w"> </span>distutils-r1
<span class="w"> </span><span class="nv">DESCRIPTION</span><span class="o">=</span><span class="s2">&quot;A lightweight password-manager with multiple database backends&quot;</span>
<span class="w"> </span><span class="nv">HOMEPAGE</span><span class="o">=</span><span class="s2">&quot;https://pwman3.github.io/pwman3/&quot;</span>
-<span class="w"> </span><span class="nv">SRC_URI</span><span class="o">=</span><span class="s2">&quot;https://github.com/pwman3/pwman3/archive/v</span><span class="si">${</span><span class="nv">PV</span><span class="si">}</span><span class="s2">.tar.gz -&gt; </span><span class="si">${</span><span class="nv">P</span><span class="si">}</span><span class="s2">.tar.gz&quot;</span>
+<span class="w"> </span><span class="nv">SRC_URI</span><span class="o">=</span><span class="s2">&quot;</span>
+<span class="s2"> https://github.com/pwman3/pwman3/archive/v</span><span class="si">${</span><span class="nv">PV</span><span class="si">}</span><span class="s2">.tar.gz</span>
+<span class="s2"> -&gt; </span><span class="si">${</span><span class="nv">P</span><span class="si">}</span><span class="s2">.tar.gz</span>
+<span class="s2"> &quot;</span>
<span class="w"> </span><span class="nv">LICENSE</span><span class="o">=</span><span class="s2">&quot;GPL-3&quot;</span>
<span class="w"> </span><span class="nv">SLOT</span><span class="o">=</span><span class="s2">&quot;0&quot;</span>
@@ -93,32 +99,33 @@ a single USE dependency. Additional Python interpreter dependencies
with specific USE flags can be constructed using <code class="docutils literal notranslate"><span class="pre">python_gen_impl_dep</span></code>
helper then. For example, the following ebuild requires Python with
SQLite support when running tests:</p>
-<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="w"> </span><span class="c1"># Copyright 1999-2020 Gentoo Authors</span>
+<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="w"> </span><span class="c1"># Copyright 1999-2024 Gentoo Authors</span>
<span class="w"> </span><span class="c1"># Distributed under the terms of the GNU General Public License v2</span>
-<span class="w"> </span><span class="nv">EAPI</span><span class="o">=</span><span class="m">7</span>
-<span class="w"> </span><span class="nv">PYTHON_COMPAT</span><span class="o">=(</span><span class="w"> </span>python<span class="o">{</span>2_7,3_<span class="o">{</span><span class="m">6</span>,7,8<span class="o">}}</span><span class="w"> </span>pypy3<span class="w"> </span><span class="o">)</span>
+<span class="w"> </span><span class="nv">EAPI</span><span class="o">=</span><span class="m">8</span>
-<span class="w"> </span>inherit<span class="w"> </span>distutils-r1
+<span class="w"> </span><span class="nv">DISTUTILS_USE_PEP517</span><span class="o">=</span>setuptools
+<span class="w"> </span><span class="nv">PYTHON_COMPAT</span><span class="o">=(</span><span class="w"> </span>python3_<span class="o">{</span><span class="m">10</span>..13<span class="o">}</span><span class="w"> </span>pypy3<span class="w"> </span><span class="o">)</span>
+
+<span class="w"> </span>inherit<span class="w"> </span>distutils-r1<span class="w"> </span>pypi
<span class="w"> </span><span class="nv">DESCRIPTION</span><span class="o">=</span><span class="s2">&quot;Let your Python tests travel through time&quot;</span>
-<span class="w"> </span><span class="nv">HOMEPAGE</span><span class="o">=</span><span class="s2">&quot;https://github.com/spulec/freezegun&quot;</span>
-<span class="w"> </span><span class="nv">SRC_URI</span><span class="o">=</span><span class="s2">&quot;mirror://pypi/</span><span class="si">${</span><span class="nv">PN</span><span class="p">:</span><span class="nv">0</span><span class="p">:</span><span class="nv">1</span><span class="si">}</span><span class="s2">/</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&quot;</span>
+<span class="w"> </span><span class="nv">HOMEPAGE</span><span class="o">=</span><span class="s2">&quot;</span>
+<span class="s2"> https://github.com/spulec/freezegun</span>
+<span class="s2"> https://pypi.org/project/freezegun/</span>
+<span class="s2"> &quot;</span>
<span class="w"> </span><span class="nv">LICENSE</span><span class="o">=</span><span class="s2">&quot;Apache-2.0&quot;</span>
<span class="w"> </span><span class="nv">SLOT</span><span class="o">=</span><span class="s2">&quot;0&quot;</span>
<span class="w"> </span><span class="nv">KEYWORDS</span><span class="o">=</span><span class="s2">&quot;~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos&quot;</span>
<span class="w"> </span><span class="nv">RDEPEND</span><span class="o">=</span><span class="s2">&quot;</span>
-<span class="s2"> &gt;dev-python/python-dateutil-2.0[</span><span class="si">${</span><span class="nv">PYTHON_USEDEP</span><span class="si">}</span><span class="s2">]</span>
-<span class="s2"> dev-python/six[</span><span class="si">${</span><span class="nv">PYTHON_USEDEP</span><span class="si">}</span><span class="s2">]</span>
+<span class="s2"> &gt;dev-python/python-dateutil-2.7[</span><span class="si">${</span><span class="nv">PYTHON_USEDEP</span><span class="si">}</span><span class="s2">]</span>
<span class="s2"> &quot;</span>
-<span class="w"> </span><span class="nv">DEPEND</span><span class="o">=</span><span class="s2">&quot;</span><span class="si">${</span><span class="nv">RDEPEND</span><span class="si">}</span>
-<span class="s2"> dev-python/setuptools[</span><span class="si">${</span><span class="nv">PYTHON_USEDEP</span><span class="si">}</span><span class="s2">]</span>
+<span class="w"> </span><span class="nv">BDEPEND</span><span class="o">=</span><span class="s2">&quot;</span>
<span class="s2"> test? (</span>
<span class="hll"><span class="s2"> </span><span class="k">$(</span>python_gen_impl_dep<span class="w"> </span>sqlite<span class="k">)</span>
-</span><span class="s2"> dev-python/mock[</span><span class="si">${</span><span class="nv">PYTHON_USEDEP</span><span class="si">}</span><span class="s2">]</span>
-<span class="s2"> )</span>
+</span><span class="s2"> )</span>
<span class="s2"> &quot;</span>
<span class="w"> </span>distutils_enable_tests<span class="w"> </span>pytest