Changeset View
Changeset View
Standalone View
Standalone View
en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
Show First 20 Lines • Show All 3,621 Lines • ▼ Show 20 Lines | <row> | ||||
<entry><varname>USE_PYTHON=distutils</varname></entry> | <entry><varname>USE_PYTHON=distutils</varname></entry> | ||||
<entry>Use Python distutils for configuring, compiling, | <entry>Use Python distutils for configuring, compiling, | ||||
and installing. This is required when the port comes | and installing. This is required when the port comes | ||||
with <filename>setup.py</filename>. This overrides | with <filename>setup.py</filename>. This overrides | ||||
the <buildtarget>do-build</buildtarget> and | the <buildtarget>do-build</buildtarget> and | ||||
<buildtarget>do-install</buildtarget> targets and may | <buildtarget>do-install</buildtarget> targets and may | ||||
also override <buildtarget>do-configure</buildtarget> | also override <buildtarget>do-configure</buildtarget> | ||||
if <varname>GNU_CONFIGURE</varname> is not | if <varname>GNU_CONFIGURE</varname> is not | ||||
defined.</entry> | defined. Additionally, it implies | ||||
<literal>USE_PYTHON=flavors</literal>.</entry> | |||||
bcr: Maybe having a link to the flavors chapter here as well is a good idea? | |||||
matAuthorUnsubmitted Done Inline ActionsMmm, I don't know, there is already a link in the USE_PYTHON=flavors entry. mat: Mmm, I don't know, there is already a link in the `USE_PYTHON=flavors` entry. | |||||
bcrUnsubmitted Done Inline ActionsAh, OK. That's fine then. bcr: Ah, OK. That's fine then. | |||||
Not Done Inline Actionsdefined. It also implies wblock: ```defined. It also implies``` | |||||
</row> | </row> | ||||
<row> | <row> | ||||
<entry><varname>USE_PYTHON=autoplist</varname></entry> | <entry><varname>USE_PYTHON=autoplist</varname></entry> | ||||
<entry>Create the packaging list automatically. This also | <entry>Create the packaging list automatically. This also | ||||
requires <literal>USE_PYTHON=distutils</literal> to be | requires <literal>USE_PYTHON=distutils</literal> to be | ||||
set.</entry> | set.</entry> | ||||
</row> | </row> | ||||
<row> | <row> | ||||
<entry><varname>USE_PYTHON=concurrent</varname></entry> | <entry><varname>USE_PYTHON=concurrent</varname></entry> | ||||
<entry>The port will use an unique prefix, typically | <entry>The port will use an unique prefix, typically | ||||
<literal>PYTHON_PKGNAMEPREFIX</literal> for certain | <literal>PYTHON_PKGNAMEPREFIX</literal> for certain | ||||
directories, such as <literal>EXAMPLESDIR</literal> and | directories, such as <literal>EXAMPLESDIR</literal> and | ||||
<literal>DOCSDIR</literal> and also will append a | <literal>DOCSDIR</literal> and also will append a | ||||
suffix, the python version from | suffix, the python version from | ||||
<literal>PYTHON_VER</literal>, to binaries and scripts | <literal>PYTHON_VER</literal>, to binaries and scripts | ||||
to be installed. This allows ports to be installed for | to be installed. This allows ports to be installed for | ||||
different Python versions at the same time, which | different Python versions at the same time, which | ||||
otherwise would install conflicting files.</entry> | otherwise would install conflicting files.</entry> | ||||
</row> | |||||
<row> | |||||
<entry><literal>USE_PYTHON=flavors</literal></entry> | |||||
<entry>The port does not use distutils but still supports | |||||
multiple Python versions. <link | |||||
linkend="flavors-auto-python"><varname>FLAVORS</varname></link> | |||||
will be set to the supported Python versions.</entry> | |||||
</row> | |||||
<row> | |||||
<entry><literal>USE_PYTHON=optsuffix</literal></entry> | |||||
<entry>If the current Python version is not the default | |||||
one, the port will have gain | |||||
<literal>PKGNAMESUFFIX=${PYTHON_PKGNAMESUFFIX}</literal>. | |||||
Done Inline Actionss/one/version/ adamw: s/one/version/ | |||||
Done Inline ActionsAnd s/have//. adamw: And s/have//. | |||||
Only useful with flavors.</entry> | |||||
</row> | </row> | ||||
Not Done Inline Actionss/Only/This is only/ wblock: s/Only/This is only/ | |||||
<row> | <row> | ||||
<entry><varname>PYTHON_PKGNAMEPREFIX</varname></entry> | <entry><varname>PYTHON_PKGNAMEPREFIX</varname></entry> | ||||
<entry>Used as a <varname>PKGNAMEPREFIX</varname> to | <entry>Used as a <varname>PKGNAMEPREFIX</varname> to | ||||
distinguish packages for different Python versions. | distinguish packages for different Python versions. | ||||
Example: <literal>py27-</literal></entry> | Example: <literal>py27-</literal></entry> | ||||
</row> | </row> | ||||
Show All 38 Lines | <row> | ||||
<entry><varname>PYXML</varname></entry> | <entry><varname>PYXML</varname></entry> | ||||
<entry>Dependency line for XML extension (not needed for | <entry>Dependency line for XML extension (not needed for | ||||
Python 2.0 and higher as it is also in base | Python 2.0 and higher as it is also in base | ||||
distribution).</entry> | distribution).</entry> | ||||
</row> | </row> | ||||
</tbody> | </tbody> | ||||
</tgroup> | </tgroup> | ||||
</table> | </table> | ||||
Not Done Inline ActionsTypo: s/conditionnal/conditional/ wblock: Typo: s/conditionnal/conditional/ | |||||
<para>A complete list of available variables can be found in | <para>A complete list of available variables can be found in | ||||
<filename>/usr/ports/Mk/Uses/python.mk</filename>.</para> | <filename>/usr/ports/Mk/Uses/python.mk</filename>.</para> | ||||
<example xml:id="python-Makefile"> | <example xml:id="python-Makefile"> | ||||
<title>Makefile for a Simple <application>Python</application> | <title>Makefile for a Simple <application>Python</application> | ||||
Module</title> | Module</title> | ||||
Not Done Inline ActionsTypo: s/conditionnal/conditional/ wblock: Typo: s/conditionnal/conditional/ | |||||
<programlisting>PORTNAME= sample | <programlisting>PORTNAME= sample | ||||
DISTVERSION= 1.2.3 | DISTVERSION= 1.2.3 | ||||
CATEGORIES= devel | CATEGORIES= devel | ||||
MAINTAINER= john@doe.tld | MAINTAINER= john@doe.tld | ||||
COMMENT= Python sample module | COMMENT= Python sample module | ||||
Not Done Inline ActionsTypo: s/conditionnal/conditional/ wblock: Typo: s/conditionnal/conditional/ | |||||
USES= python | USES= python | ||||
USE_PYTHON= autoplist distutils | USE_PYTHON= autoplist distutils | ||||
.include <bsd.port.mk></programlisting> | .include <bsd.port.mk></programlisting> | ||||
</example> | </example> | ||||
<para>Some Python applications claim to have | <para>Some Python applications claim to have | ||||
Not Done Inline ActionsTypo: s/conditionnal/conditional/ wblock: Typo: s/conditionnal/conditional/ | |||||
<varname>DESTDIR</varname> support (which would be required | <varname>DESTDIR</varname> support (which would be required | ||||
for staging) but it is broken (Mailman up to 2.1.16, for | for staging) but it is broken (Mailman up to 2.1.16, for | ||||
instance). This can be worked around by recompiling the | instance). This can be worked around by recompiling the | ||||
scripts. This can be done, for example, in the | scripts. This can be done, for example, in the | ||||
<buildtarget>post-build</buildtarget> target. Assuming the | <buildtarget>post-build</buildtarget> target. Assuming the | ||||
Python scripts are supposed to reside in | Python scripts are supposed to reside in | ||||
<varname>PYTHONPREFIX_SITELIBDIR</varname> after installation, | <varname>PYTHONPREFIX_SITELIBDIR</varname> after installation, | ||||
Not Done Inline ActionsTypo: s/conditionnal/conditional/ wblock: Typo: s/conditionnal/conditional/ | |||||
this solution can be applied:</para> | this solution can be applied:</para> | ||||
<programlisting>(cd ${STAGEDIR}${PREFIX} \ | <programlisting>(cd ${STAGEDIR}${PREFIX} \ | ||||
&& ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \ | && ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \ | ||||
-d ${PREFIX} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;})</programlisting> | -d ${PREFIX} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;})</programlisting> | ||||
<para>This recompiles the sources with a path relative to the | <para>This recompiles the sources with a path relative to the | ||||
stage directory, and prepends the value of | stage directory, and prepends the value of | ||||
▲ Show 20 Lines • Show All 1,704 Lines • Show Last 20 Lines |
Maybe having a link to the flavors chapter here as well is a good idea?