pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/python

Module Name:    pkgsrc
Committed By:   wiz
Date:           Wed Jan 12 08:34:34 UTC 2022

Modified Files:

Log Message:
python: update comments for *.mk

Also, remove PY_NO_EGG support, unused

To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 pkgsrc/lang/python/
cvs rdiff -u -r1.58 -r1.59 pkgsrc/lang/python/

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/python/
diff -u pkgsrc/lang/python/ pkgsrc/lang/python/
--- pkgsrc/lang/python/      Sun Jan  9 11:58:15 2022
+++ pkgsrc/lang/python/   Wed Jan 12 08:34:34 2022
@@ -1,4 +1,4 @@
-# $NetBSD:,v 1.34 2022/01/09 11:58:15 wiz Exp $
+# $NetBSD:,v 1.35 2022/01/12 08:34:34 wiz Exp $
 # Common logic to handle Python Eggs
@@ -6,8 +6,9 @@
 .include "../../lang/python/"
 # 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
+# use setuptools to create an egg.
+# For wheel (*.whl) support, look at
 EGG_NAME?=     ${DISTNAME:C/-([^0-9])/_\1/g}
@@ -15,16 +16,15 @@ EGG_INFODIR?=       ${EGG_NAME}-py${PYVERSSUFF
-# True eggs always have an egg-info directory, and thus there is no
-# PLIST conditional (as in 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 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/ 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!
@@ -37,10 +37,8 @@ PRINT_PLIST_AWK+=    { gsub(/${PYVERSSUFFIX
-# 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.
 TOOL_DEPENDS+=         ${PYPKGPREFIX}-expat-[0-9]*:../../textproc/py-expat

Index: pkgsrc/lang/python/
diff -u pkgsrc/lang/python/ pkgsrc/lang/python/
--- pkgsrc/lang/python/        Fri Aug 28 00:47:57 2020
+++ pkgsrc/lang/python/     Wed Jan 12 08:34:34 2022
@@ -1,15 +1,12 @@
-# $NetBSD:,v 1.58 2020/08/28 00:47:57 gutteridge Exp $
+# $NetBSD:,v 1.59 2022/01/12 08:34:34 wiz Exp $
 .include "../../lang/python/"
-# 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, via distutils (confusing, with an egg-info file,
-# even though they are not eggs), or via more ad hoc methods.
+# eggs (see, via wheels (see, or via more ad hoc
+# methods.
 .if defined(PYDISTUTILSPKG)
 .include "../../mk/"
@@ -49,18 +46,6 @@ do-test:
-# 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/
 .if defined(PY_PATCHPLIST)
 # mostly for ALTERNATIVES files
-# prepare Python>=3.2 bytecode file location change
+# Python>=3.2 bytecode file location change
 .if empty(_PYTHON_VERSION:M2?)
 PLIST_AWK+=            -f ${PKGSRCDIR}/lang/python/plist-python.awk
@@ -80,6 +65,10 @@ EARLY_PRINT_PLIST_AWK+=      gsub(/opt-1\.pyc
 EARLY_PRINT_PLIST_AWK+=        gsub(/\.cpython-${_PYTHON_VERSION}/, "")}
+# For running tests before installation of the package,
+# this is sometimes needed; or setting
+# TEST_ENV+=   PYTHONPATH=${WRKSRC}/build/lib

Home | Main Index | Thread Index | Old Index