pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/python Add a PYTHON_VERSIONS_INCOMPATIBLE, an add...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/44abdf6e2bbb
branches:  trunk
changeset: 476318:44abdf6e2bbb
user:      tv <tv%pkgsrc.org@localhost>
date:      Sun Jun 06 16:24:55 2004 +0000

description:
Add a PYTHON_VERSIONS_INCOMPATIBLE, an additive variable that can be set
by package Makefiles as well as buildlink3s to prevent usage of particular
versions of Python -- even if they appear in PYTHON_VERSIONS_ACCEPTED.

(And make Darwin exclusion use this variable instead, so that it effectively
overrides any pkg's definition of _ACCEPTED.)

diffstat:

 lang/python/pyversion.mk |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (50 lines):

diff -r 0264d5bd3711 -r 44abdf6e2bbb lang/python/pyversion.mk
--- a/lang/python/pyversion.mk  Sun Jun 06 16:01:48 2004 +0000
+++ b/lang/python/pyversion.mk  Sun Jun 06 16:24:55 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: pyversion.mk,v 1.27 2004/05/23 17:15:09 recht Exp $
+# $NetBSD: pyversion.mk,v 1.28 2004/06/06 16:24:55 tv Exp $
 
 .if !defined(PYTHON_PYVERSION_MK)
 PYTHON_PYVERSION_MK=   defined
@@ -7,12 +7,12 @@
 
 PYTHON_VERSION_DEFAULT?=               23
 .if ${OPSYS} == "Darwin"
-PYTHON_VERSIONS_ACCEPTED?=             23pth 22pth
+PYTHON_VERSIONS_INCOMPATIBLE+=         23 22 21 21pth 20 15
 BUILDLINK_DEPENDS.python22-pth?=       python22-pth>=2.2.3nb2
 BUILDLINK_DEPENDS.python23-pth?=       python23-pth>=2.3.3nb3
-.else
+.endif
 PYTHON_VERSIONS_ACCEPTED?=             23 23pth 22 22pth 21 21pth 20
-.endif
+PYTHON_VERSIONS_INCOMPATIBLE?=         # empty by default
 
 BUILDLINK_DEPENDS.python15?=           python15>=1.5
 BUILDLINK_DEPENDS.python20?=           python20>=2.0
@@ -25,7 +25,9 @@
 
 # transform the list into individual variables
 .for pv in ${PYTHON_VERSIONS_ACCEPTED}
+.if empty(PYTHON_VERSIONS_INCOMPATIBLE:M${pv})
 _PYTHON_VERSION_${pv}_OK=      yes
+.endif
 .endfor
 
 # check what is installed
@@ -73,12 +75,14 @@
 # prefer an already installed version, in order of "accepted"
 .if !defined(_PYTHON_VERSION)
 .for pv in ${PYTHON_VERSIONS_ACCEPTED}
+.if defined(_PYTHON_VERSION_${pv}_OK)
 .if defined(_PYTHON_VERSION_${pv}_INSTALLED)
 _PYTHON_VERSION?=      ${pv}
 .else
 # keep information as last resort - see below
 _PYTHON_VERSION_FIRSTACCEPTED?=        ${pv}
 .endif
+.endif
 .endfor
 .endif
 # if the default is OK for the addon pkg, take this



Home | Main Index | Thread Index | Old Index