diff options
Diffstat (limited to 'guide/depend.html')
-rw-r--r-- | guide/depend.html | 51 |
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">"sqlite"</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">"Modern music player for GNOME"</span> <span class="w"> </span><span class="nv">HOMEPAGE</span><span class="o">=</span><span class="s2">"https://wiki.gnome.org/Apps/Lollypop"</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">"GPL-3"</span> <span class="w"> </span><span class="nv">SLOT</span><span class="o">=</span><span class="s2">"0"</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">"</span><span class="si">${</span><span class="nv">PYTHON_REQUIRED_USE</span><span class="si">}</span><span class="s2">"</span> <span class="w"> </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> @@ -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">"sqlite?"</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">"A lightweight password-manager with multiple database backends"</span> <span class="w"> </span><span class="nv">HOMEPAGE</span><span class="o">=</span><span class="s2">"https://pwman3.github.io/pwman3/"</span> -<span class="w"> </span><span class="nv">SRC_URI</span><span class="o">=</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="si">${</span><span class="nv">P</span><span class="si">}</span><span class="s2">.tar.gz"</span> +<span class="w"> </span><span class="nv">SRC_URI</span><span class="o">=</span><span class="s2">"</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"> -> </span><span class="si">${</span><span class="nv">P</span><span class="si">}</span><span class="s2">.tar.gz</span> +<span class="s2"> "</span> <span class="w"> </span><span class="nv">LICENSE</span><span class="o">=</span><span class="s2">"GPL-3"</span> <span class="w"> </span><span class="nv">SLOT</span><span class="o">=</span><span class="s2">"0"</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">"Let your Python tests travel through time"</span> -<span class="w"> </span><span class="nv">HOMEPAGE</span><span class="o">=</span><span class="s2">"https://github.com/spulec/freezegun"</span> -<span class="w"> </span><span class="nv">SRC_URI</span><span class="o">=</span><span class="s2">"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"</span> +<span class="w"> </span><span class="nv">HOMEPAGE</span><span class="o">=</span><span class="s2">"</span> +<span class="s2"> https://github.com/spulec/freezegun</span> +<span class="s2"> https://pypi.org/project/freezegun/</span> +<span class="s2"> "</span> <span class="w"> </span><span class="nv">LICENSE</span><span class="o">=</span><span class="s2">"Apache-2.0"</span> <span class="w"> </span><span class="nv">SLOT</span><span class="o">=</span><span class="s2">"0"</span> <span class="w"> </span><span class="nv">KEYWORDS</span><span class="o">=</span><span class="s2">"~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"</span> <span class="w"> </span><span class="nv">RDEPEND</span><span class="o">=</span><span class="s2">"</span> -<span class="s2"> >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"> >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"> "</span> -<span class="w"> </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"> 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">"</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"> "</span> <span class="w"> </span>distutils_enable_tests<span class="w"> </span>pytest |