From d1beca5d1bdc963bad8c9dad99826458ab230d97 Mon Sep 17 00:00:00 2001 From: wiz Date: Sat, 18 Jan 2014 20:17:10 +0000 Subject: Update Python section and document versioned_dependencies.mk. --- doc/guide/files/creating.xml | 62 +++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 26 deletions(-) (limited to 'doc/guide') diff --git a/doc/guide/files/creating.xml b/doc/guide/files/creating.xml index 1daa4de2e6e..13c20f68792 100644 --- a/doc/guide/files/creating.xml +++ b/doc/guide/files/creating.xml @@ -1,4 +1,4 @@ - + Creating a new pkgsrc package from scratch @@ -136,23 +136,12 @@ settings that are typical of KDE packages. Python modules and programs packages are easily created using a set of predefined variables. -Most Python packages use either distutils or -easy-setup (eggs). -If the software uses distutils, set the -PYDISTUTILSPKG variable to yes so -pkgsrc will make use of this framework. -distutils uses a script called setup.py, -if the distutils driver is not called -setup.py, set the PYSETUP variable -to the name of the script. - -If the default Python versions are not supported by the software, set the -PYTHON_VERSIONS_ACCEPTED variable to the Python versions -the software is known to work with, from the most recent to the older -one, e.g. +If some Python versions are not supported by the software, set the +PYTHON_VERSIONS_INCOMPATIBLE variable to the Python versions +that are not supported, e.g. -PYTHON_VERSIONS_ACCEPTED= 33 27 26 +PYTHON_VERSIONS_ACCEPTED= 26 @@ -166,22 +155,43 @@ DISTNAME= foopymodule-1.2.10 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} -If it is an application, also include -../../lang/python/application.mk -before extension.mk. - -If the packaged software, either it is an application or a module, is -egg-aware, you only need to include -../../lang/python/egg.mk. - -In order to correctly set the path to the Python interpreter, use the +If it is an application, include +../../lang/python/application.mk. +In order to correctly set the path to the Python interpreter, use the REPLACE_PYTHON variable and set it to the list of files (paths relative to WRKSRC) that must be corrected. -For example : +For example: REPLACE_PYTHON= *.py +Most Python packages use either distutils or +easy-setup (eggs). +If the software uses distutils, include +../../lang/python/distutils.mk. +so pkgsrc will use this framework. +distutils uses a script called setup.py, +if the distutils driver is not called +setup.py, set the PYSETUP variable +to the name of the script. + +Otherwise, if the packaged software is egg-aware, you only need +to include +../../lang/python/egg.mk. + +Some Python modules have separate distributions for Python-2.x +and Python-3.x support. In pkgsrc this is handled by the +versioned_dependencies.mk file. Set +PYTHON_VERSIONED_DEPENDENCIES to the list of +packages that should be depended upon and include +../../lang/python/versioned_dependencies.mk, +then the pkgsrc infrastructure will depend on the appropriate package +version. For example: + +PYTHON_VERSIONED_DEPENDENCIES=dateutil dns + +Look inside versioned_dependencies.mk for a list +of supported packages. -- cgit v1.2.3