Skip to content

Commit a0842c4

Browse files
author
gdt
committed
lang/python/pyversion.mk: Explain the rules for setting ACCEPTED
1 parent 559fbed commit a0842c4

1 file changed

Lines changed: 21 additions & 4 deletions

File tree

lang/python/pyversion.mk

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: pyversion.mk,v 1.172 2025/07/22 12:24:28 gdt Exp $
1+
# $NetBSD: pyversion.mk,v 1.173 2025/07/22 14:30:26 gdt Exp $
22

33
# This file provides an interface to decide which version of python
44
# should be used in building a package. It should be directly
@@ -7,19 +7,36 @@
77
# that embeds python. It is indirectly included by the other methods.
88
#
99
# There are three kinds of python versions:
10-
# 2.7: Very old, and only usable if explicitly marked as supported.
11-
# old 3.x: Usable if explicitly marked as supported and requested,
10+
# - 2.7: Very old, and only usable if explicitly marked as supported.
11+
# - old 3.x: Usable if explicitly marked as supported and requested,
1212
# but globally disabled by default because too many packages fail,
1313
# and it's painful for no gain to have to explicitly exclude it.
1414
# Bulk builds do not build these versions.
15-
# current 3.x: Usable unless marked as not accepted. Includes the
15+
# - current 3.x: Usable unless marked as not accepted. Includes the
1616
# default version, older versions not yet too troublesome, and
1717
# often a version newer than default.
1818
#
1919
# The value of "current 3.x" is defined by the default value of
2020
# PYTHON_VERSIONS_ACCEPTED. pbulk uses this set to determine which
2121
# python versions are built during a bulk build.
2222
#
23+
# For any given package, there are a set of python3 versions that one
24+
# can use with the upstream code, and perhaps a reduced version that
25+
# pkgsrc chooses to use, often due to dependencies in pkgsrc not
26+
# supporting an older version. The set of versions is expressed in
27+
# one of several ways, but not a mixture:
28+
# - No variables set, meaning that the supported versions are exactly
29+
# those in the default value of PYTHON_VERSIONS_ACCEPTED.
30+
# - PYTHON_VERSIONS_ACCEPTED set, meaning that is the set of
31+
# buildable versions. This can include values not in the default,
32+
# and it can omit values in the default.
33+
# - PYTHON_VERSIONS_INCOMPATIBLE set, meaning that the set of
34+
# buildable versions is the default value of
35+
# PYTHON_VERSIONS_ACCEPTED, minus the INCOMPATIBLE versions. This
36+
# is preferred when omitting a specific old version, so that when a
37+
# new version is added, it is included.
38+
# NB: If a version is in the ACCEPTED set, that version must also be
39+
# in the ACCEPTED set of every (recursive) dependency.
2340
#
2441
# The general plan for version selection (ignoring 2.7) is:
2542
# - If PYTHON_VERSION_REQD is set, choose it (and fail if not in

0 commit comments

Comments
 (0)