Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -1,4 +1,4 @@
<!-- $NetBSD: creating.xml,v 1.19 2015/04/14 11:21:05 wiz Exp $ -->
<!-- $NetBSD: creating.xml,v 1.21 2016/06/30 18:03:46 wiz Exp $ -->
<chapter id="creating">
<title>Creating a new pkgsrc package from scratch</title>
@@ -145,9 +145,24 @@ PYTHON_VERSIONS_INCOMPATIBLE= 27
</programlisting></para>
<para>
If the packaged software is a Python module, include
<quote><filename>../../lang/python/extension.mk</filename></quote>.
In this case, the package directory should be called
If the packaged software is a Python module, include one of
<filename>../../lang/python/egg.mk</filename>,
<filename>../../lang/python/distutils.mk</filename>, or
<filename>../../lang/python/extension.mk</filename>.</para>
<para>Most Python packages use either <quote>distutils</quote> or
easy-setup/setuptools (<quote>eggs</quote>).
if the packaged software is using setuptools, you only need
to include <quote><filename>../../lang/python/egg.mk</filename></quote>.
Otherwise, if the software uses <quote>distutils</quote>, include
<quote><filename>../../lang/python/distutils.mk</filename></quote>.
so pkgsrc will use this framework.
<quote>distutils</quote> uses a script called <filename>setup.py</filename>,
if the <quote>distutils</quote> driver is not called
<filename>setup.py</filename>, set the <varname>PYSETUP</varname> variable
to the name of the script.</para>
<para>Either way, the package directory should be called
<quote>py-software</quote> and <varname>PKGNAME</varname> should be set to
<quote>${PYPKGPREFIX}-${DISTNAME}</quote>, e.g.
<programlisting>
@@ -165,20 +180,6 @@ For example:
REPLACE_PYTHON= *.py
</programlisting></para>
<para>Most Python packages use either <quote>distutils</quote> or
easy-setup (<quote>eggs</quote>).
If the software uses <quote>distutils</quote>, include
<quote><filename>../../lang/python/distutils.mk</filename></quote>.
so pkgsrc will use this framework.
<quote>distutils</quote> uses a script called <filename>setup.py</filename>,
if the <quote>distutils</quote> driver is not called
<filename>setup.py</filename>, set the <varname>PYSETUP</varname> variable
to the name of the script.</para>
<para>Otherwise, if the packaged software is egg-aware, you only need
to include
<quote><filename>../../lang/python/egg.mk</filename></quote>.</para>
<para>Some Python modules have separate distributions for Python-2.x
and Python-3.x support. In pkgsrc this is handled by the
<filename>versioned_dependencies.mk</filename> file. Set
@@ -188,7 +189,7 @@ packages that should be depended upon and include
then the pkgsrc infrastructure will depend on the appropriate package
version. For example:
<programlisting>
PYTHON_VERSIONED_DEPENDENCIES=dateutil dns
PYTHON_VERSIONED_DEPENDENCIES=dateutil
</programlisting>
Look inside <filename>versioned_dependencies.mk</filename> for a list
of supported packages.</para>