Permalink
Browse files

Introduce variable PYTHON_SELF_CONFLICT

for registering conflicts between python modules.
  • Loading branch information...
1 parent d2cb15a commit d68bd4cb69eeb08b91cac84400b76019a87884c2 cheusov committed Oct 3, 2012
Showing with 16 additions and 1 deletion.
  1. +16 −1 lang/python/pyversion.mk
View
@@ -1,4 +1,4 @@
-# $NetBSD: pyversion.mk,v 1.102 2012/10/03 22:03:41 wiz Exp $
+# $NetBSD: pyversion.mk,v 1.103 2012/10/03 23:39:21 cheusov Exp $
# This file determines which Python version is used as a dependency for
# a package.
@@ -49,6 +49,13 @@
# Possible values: (defined) (undefined)
# Default: (undefined)
#
+# PYTHON_SELF_CONFLICT
+# If set to "yes", additional CONFLICTS entries are added for
+# registering a conflict between pyNN-<modulename> packages.
+#
+# Possible values: yes no
+# Default: no
+#
# === Defined variables ===
#
# PYPKGPREFIX
@@ -141,6 +148,14 @@ MULTI+= PYTHON_VERSION_REQD=${_PYTHON_VERSION}
_PYTHON_VERSION= none
.endif
+# Additional CONFLICTS
+.if ${PYTHON_SELF_CONFLICT:U:tl} == "yes"
+.for i in ${PYTHON_VERSIONS_ACCEPTED:N${_PYTHON_VERSION}}
+CONFLICTS += ${PKGNAME:S/py${_PYTHON_VERSION}/py${i}/:C/-[0-9].*$/-[0-9]*/}
+.endfor
+.endif # PYCONFLICTS
+
+#
PLIST_VARS+= py2x py3x
.if ${_PYTHON_VERSION} == "32"

0 comments on commit d68bd4c

Please sign in to comment.