pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/python python: update comments for *.mk
details: https://anonhg.NetBSD.org/pkgsrc/rev/3cbcbd7fd576
branches: trunk
changeset: 371685:3cbcbd7fd576
user: wiz <wiz%pkgsrc.org@localhost>
date: Wed Jan 12 08:34:34 2022 +0000
description:
python: update comments for *.mk
Also, remove PY_NO_EGG support, unused
diffstat:
lang/python/egg.mk | 28 +++++++++++++---------------
lang/python/extension.mk | 27 ++++++++-------------------
2 files changed, 21 insertions(+), 34 deletions(-)
diffs (119 lines):
diff -r b9834e29ce0d -r 3cbcbd7fd576 lang/python/egg.mk
--- a/lang/python/egg.mk Wed Jan 12 08:22:31 2022 +0000
+++ b/lang/python/egg.mk Wed Jan 12 08:34:34 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: egg.mk,v 1.34 2022/01/09 11:58:15 wiz Exp $
+# $NetBSD: egg.mk,v 1.35 2022/01/12 08:34:34 wiz Exp $
#
# Common logic to handle Python Eggs
#
@@ -6,8 +6,9 @@
.include "../../lang/python/pyversion.mk"
# This file should be included to package python "distributions" which
-# use setuptools to create an egg. Some distributions use distutils,
-# which creates an egg-info file; those should use distutils.mk
+# use setuptools to create an egg.
+#
+# For wheel (*.whl) support, look at wheel.mk.
EGG_NAME?= ${DISTNAME:C/-([^0-9])/_\1/g}
EGG_INFODIR?= ${EGG_NAME}-py${PYVERSSUFFIX}.egg-info
@@ -15,16 +16,15 @@
PYDISTUTILSPKG= yes
PY_PATCHPLIST= yes
-# True eggs always have an egg-info directory, and thus there is no
-# PLIST conditional (as in distutils.mk for old versions of python).
-# Note that we substitute EGG_INFODIR rather than EGG_FILE, because
-# the egg information in an egg comprises multiple files in an
+# True eggs always have an egg-info directory egg.mk can also
+# be used for distutils packages, in which case there will be no
# egg-info directory.
-# The PLIST substitution of EGG_NAME is not necessary. However, it
-# is convenient. See lang/ruby/gem.mk and PLIST files for ruby gem
-# packages to understand other examples of this feature in non-python
-# packages.
+# Please note that some packages do not provide this directory
+# with the last setuptools version that supports python 2.7.
+# In this case, the ${EGG_INFODIR} lines in the PLIST need to
+# be prefixed with ${PLIST.py3x} - please always test with both
+# python 2.7 and the current python 3.x default!
PLIST_SUBST+= EGG_NAME=${EGG_NAME}-py${PYVERSSUFFIX}
PLIST_SUBST+= EGG_INFODIR=${EGG_INFODIR}
@@ -37,10 +37,8 @@
USE_PKG_RESOURCES?= no
-# py-setuptools depends on a couple py-* packages that need to be installed
-# beforehand. Of course, those can not be built and installed using py-setuptools
-# itself; so use the setuptools version included with python itself for installing
-# them.
+# py-setuptools needs to be bootstrapped from python itself, without using
+# py-setuptools.
BOOTSTRAP_SETUPTOOLS?= no
.if ${BOOTSTRAP_SETUPTOOLS} == "yes"
TOOL_DEPENDS+= ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat
diff -r b9834e29ce0d -r 3cbcbd7fd576 lang/python/extension.mk
--- a/lang/python/extension.mk Wed Jan 12 08:22:31 2022 +0000
+++ b/lang/python/extension.mk Wed Jan 12 08:34:34 2022 +0000
@@ -1,15 +1,12 @@
-# $NetBSD: extension.mk,v 1.58 2020/08/28 00:47:57 gutteridge Exp $
+# $NetBSD: extension.mk,v 1.59 2022/01/12 08:34:34 wiz Exp $
.include "../../lang/python/pyversion.mk"
-# Packages that are a non-egg distutils extension should set
-# PYDISTUTILSPKG=YES and include this mk file.
-
# This mk fragment is included to handle packages that create
# extensions to python, which by definition are those that place files
# in ${PYSITELIB}. Extensions can be implemented via setuptools as
-# eggs (see egg.mk), via distutils (confusing, with an egg-info file,
-# even though they are not eggs), or via more ad hoc methods.
+# eggs (see egg.mk), via wheels (see wheel.mk), or via more ad hoc
+# methods.
.if defined(PYDISTUTILSPKG)
.include "../../mk/bsd.prefs.mk"
@@ -49,18 +46,6 @@
.endif
-# PY_NO_EGG suppress the installation of the egg info file (and
-# therefore its inclusion in the package). Python practice is be to
-# use these files to let 'require' verify that python distributions
-# are present, and therefore the default value of PY_NO_EGG=yes causes
-# pkgsrc not to conform to python norms. The reason for this behavior
-# appears to be that creating egg info files was new in Python 2.5.
-PY_NO_EGG?= yes
-.if !empty(PY_NO_EGG:M[yY][eE][sS])
-# see python*/patches/patch-Lib_distutils_command_install.py
-INSTALL_ENV+= PKGSRC_PYTHON_NO_EGG=defined
-.endif
-
.if defined(PY_PATCHPLIST)
PLIST_SUBST+= PYINC=${PYINC} PYLIB=${PYLIB} PYSITELIB=${PYSITELIB}
PLIST_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX}
@@ -69,7 +54,7 @@
# mostly for ALTERNATIVES files
FILES_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX}
-# prepare Python>=3.2 bytecode file location change
+# Python>=3.2 bytecode file location change
# http://www.python.org/dev/peps/pep-3147/
.if empty(_PYTHON_VERSION:M2?)
PLIST_AWK+= -f ${PKGSRCDIR}/lang/python/plist-python.awk
@@ -80,6 +65,10 @@
EARLY_PRINT_PLIST_AWK+= gsub(/\.cpython-${_PYTHON_VERSION}/, "")}
.endif
+# For running tests before installation of the package,
+# this is sometimes needed; or setting
+# TEST_ENV+= PYTHONPATH=${WRKSRC}/build/lib
+
DISTUTILS_BUILDDIR_IN_TEST_ENV?= no
.if ${DISTUTILS_BUILDDIR_IN_TEST_ENV} == "yes"
Home |
Main Index |
Thread Index |
Old Index