add -V 1 to PKG_ARGS for ports using python 3, so that updates work without ERANGE bumps

This commit is contained in:
sthen
2025-11-14 17:46:39 +00:00
parent 59780cda41
commit 3fd2581a3b
2 changed files with 9 additions and 2 deletions
+5 -1
View File
@@ -1,4 +1,4 @@
# $OpenBSD: arch-defines.mk,v 1.112 2025/10/24 14:25:34 rsadowski Exp $
# $OpenBSD: arch-defines.mk,v 1.113 2025/11/14 17:46:39 sthen Exp $
#
# ex:ts=4 sw=4 filetype=make:
#
@@ -107,6 +107,10 @@ _SYSTEM_VERSION-clang = 3
_SYSTEM_VERSION-go = ${_MODGO_SYSTEM_VERSION}
.endif
.if defined(MODULES) && ${MODULES:Mlang/python}
_PKG_ARGS_VERSION += -V ${_MODPY_SYSTEM_VERSION}
.endif
# defined in rust.port.mk; added to version for all rust arches so that
# rust-compiled packages can be updated easily for a new rust compiler/stdlib
_SYSTEM_VERSION-rust ?= 0
+4 -1
View File
@@ -1,10 +1,13 @@
MODPY_DEFAULT_VERSION_2 = 2.7
MODPY_DEFAULT_VERSION_3 = 3.12
MODPY_DEFAULT_VERSION_3 = 3.13
MODPY_VERSION ?= ${MODPY_DEFAULT_VERSION_3}
.if ${MODPY_VERSION} == ${MODPY_DEFAULT_VERSION_3}
# bump this to avoid bumping all the ports for PLIST changes
_MODPY_SYSTEM_VERSION = 1
. include "${PORTSDIR}/lang/python/3/python.port.mk"
.elif ${MODPY_VERSION} == ${MODPY_DEFAULT_VERSION_2}
_MODPY_SYSTEM_VERSION = 0
. include "${PORTSDIR}/lang/python/2.7/python.port.mk"
.else
ERRORS += "Fatal: MODPY_VERSION ${MODPY_VERSION} is not supported"