<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-guide.
</pre>
<p><a href="https://github.com/macports/macports-guide/commit/69a9c2b07b4b8e6355ef2bae343ab7977b1af41d">https://github.com/macports/macports-guide/commit/69a9c2b07b4b8e6355ef2bae343ab7977b1af41d</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 69a9c2b guide: add docs for python.pep517
</span>69a9c2b is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 69a9c2b07b4b8e6355ef2bae343ab7977b1af41d
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Wed Dec 29 16:42:53 2021 +1100
<span style='display:block; white-space:pre;color:#404040;'> guide: add docs for python.pep517
</span>---
guide/xml/portgroup-python.xml | 102 +++++++++++++++++++++++++++++++++++++----
1 file changed, 93 insertions(+), 9 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/guide/xml/portgroup-python.xml b/guide/xml/portgroup-python.xml
</span><span style='display:block; white-space:pre;color:#808080;'>index 5153f56..7ec76ca 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/guide/xml/portgroup-python.xml
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/guide/xml/portgroup-python.xml
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -27,10 +27,10 @@
</span> created, and will depend on python26 and python27 respectively.</para>
<para>If the port name does not start with <quote>py-</quote>, it is interpreted
as an application written in python rather than a python module. In
<span style='display:block; white-space:pre;background:#ffe0e0;'>- this case, no subports are defined, and <code>python.versions</code> defaults to
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- the value of <code>python.default_version</code>, which must be set. For example,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ this case, no subports are defined, and <varname>python.versions</varname> defaults to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ the value of <varname>python.default_version</varname>, which must be set. For example,
</span> if a port named <quote>mercurial</quote> sets <code>python.default_version 27</code>, then
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <code>python.versions</code> will automatically be set to <quote>27</quote>, and a dependency
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <varname>python.versions</varname> will automatically be set to <quote>27</quote>, and a dependency
</span> on python27 will be added.</para>
<itemizedlist>
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -52,7 +52,7 @@
</span> <para>For modules (i.e., name starts with <quote>py-</quote>), this sets the
subport that will be installed if the user asks to install <quote>py-foo</quote>
rather than, e.g., <quote>py26-foo</quote> or <quote>py27-foo</quote>. If not explicitly set, a
<span style='display:block; white-space:pre;background:#ffe0e0;'>- reasonable default is chosen from the list in <code>python.versions</code>.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reasonable default is chosen from the list in <varname>python.versions</varname>.</para>
</span> <para>For applications (i.e., name does not start with <quote>py-</quote>), this chooses
which version of python to use, and must be set. It can be changed
in variants if desired.</para>
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -64,7 +64,87 @@
</span> <listitem>
<para>Example:</para>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <programlisting>python.default_version 32</programlisting>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <programlisting>python.default_version 39</programlisting>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </itemizedlist>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </varlistentry>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <varlistentry>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <term>python.pep517</term>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>If set to <quote>yes</quote>, the port will be built as per
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <link xlink:href="https://www.python.org/dev/peps/pep-0517/">PEP 517</link>.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Dependencies on appropriate front end tools will be added
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ automatically. This is supported when using Python 3.6 or later.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>If set to <quote>no</quote>, the port will be built with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ traditional distutils/setuptools <code>setup.py</code> commands.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>New ports should set this to <quote>yes</quote> if possible. The default
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ may change to <quote>yes</quote> in the future.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <itemizedlist>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Type: optional</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Default: no</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Example:</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <programlisting>python.pep517 yes</programlisting>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </itemizedlist>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </varlistentry>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <varlistentry>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <term>python.pep517_backend</term>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>This can be set to the name of the PEP 517 build back-end used by the port.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ If <varname>python.pep517</varname> is set to <quote>yes</quote>, dependencies on the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ports that provide the specified back-end will be added automatically.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Currently supported values are <quote>setuptools</quote>, <quote>flit</quote>,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and <quote>poetry</quote>. Clearing this option or setting it to an
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unsupported value will result in no back-end dependencies being added.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <itemizedlist>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Type: optional</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Default: setuptools</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Example:</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <programlisting>python.pep517_backend flit</programlisting>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </itemizedlist>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </varlistentry>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <varlistentry>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <term>python.add_dependencies</term>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>If set to <quote>yes</quote>, a dependency on a python interpreter will
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ be added as per <varname>python.version</varname>, and if <varname>python.pep517</varname>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ is also set to <quote>yes</quote>, dependencies on appropriate front- and back-end
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ tools will also be added.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>If set to <quote>no</quote>, the portgroup will not add any dependencies,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and all required dependencies need to be declared in the Portfile.</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <itemizedlist>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Type: optional</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Default: yes</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ </listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <listitem>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Example:</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <programlisting>python.add_dependencies no</programlisting>
</span> </listitem>
</itemizedlist>
</listitem>
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -248,7 +328,8 @@
</span> <term>build.cmd</term>
<listitem>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <para>Default: <varname>${python.bin}</varname> setup.py --no-user-cfg</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Default (<code>python.pep517 no</code>): <varname>${python.bin}</varname> setup.py --no-user-cfg</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Default (<code>python.pep517 yes</code>): <varname>${python.bin}</varname> -m build --wheel --no-isolation --outdir <varname>${workpath}</varname></para>
</span> </listitem>
</varlistentry>
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -256,7 +337,8 @@
</span> <term>build.target</term>
<listitem>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <para>Default: build</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Default (<code>python.pep517 no</code>): build</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Default (<code>python.pep517 yes</code>): (empty)</para>
</span> </listitem>
</varlistentry>
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -264,7 +346,8 @@
</span> <term>destroot.cmd</term>
<listitem>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <para>Default: <varname>${python.bin}</varname> setup.py --no-user-cfg</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Default (<code>python.pep517 no</code>): <varname>${python.bin}</varname> setup.py --no-user-cfg</para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Default (<code>python.pep517 yes</code>): <varname>${python.bin}</varname> -m install --verbose</para>
</span> </listitem>
</varlistentry>
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -272,7 +355,8 @@
</span> <term>destroot.destdir</term>
<listitem>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <para>Default: --prefix=<varname>${python.prefix}</varname> --root=<varname>${destroot}</varname></para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Default (<code>python.pep517 no</code>): --prefix=<varname>${python.prefix}</varname> --root=<varname>${destroot}</varname></para>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <para>Default (<code>python.pep517 yes</code>): --destdir <varname>${destroot}</varname></para>
</span> </listitem>
</varlistentry>
</pre><pre style='margin:0'>
</pre>