| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: pyversion.mk,v 1.135 2021/04/23 19:20:08 nia Exp $ | | 1 | # $NetBSD: pyversion.mk,v 1.136 2021/07/10 05:24:33 gutteridge Exp $ |
2 | | | 2 | |
3 | # This file determines which Python version is used as a dependency for | | 3 | # This file determines which Python version is used as a dependency for |
4 | # a package. | | 4 | # a package. |
5 | # | | 5 | # |
6 | # === User-settable variables === | | 6 | # === User-settable variables === |
7 | # | | 7 | # |
8 | # PYTHON_VERSION_DEFAULT | | 8 | # PYTHON_VERSION_DEFAULT |
9 | # The preferred Python version to use. | | 9 | # The preferred Python version to use. |
10 | # | | 10 | # |
11 | # Possible values: 27 36 37 38 39 | | 11 | # Possible values: 27 36 37 38 39 |
12 | # Default: 38 | | 12 | # Default: 38 |
13 | # | | 13 | # |
14 | # === Infrastructure variables === | | 14 | # === Infrastructure variables === |
| @@ -90,27 +90,27 @@ PYTHON_VERSIONS_INCOMPATIBLE?= # empty | | | @@ -90,27 +90,27 @@ PYTHON_VERSIONS_INCOMPATIBLE?= # empty |
90 | | | 90 | |
91 | # transform the list into individual variables | | 91 | # transform the list into individual variables |
92 | .for pv in ${PYTHON_VERSIONS_ACCEPTED} | | 92 | .for pv in ${PYTHON_VERSIONS_ACCEPTED} |
93 | . if empty(PYTHON_VERSIONS_INCOMPATIBLE:M${pv}) | | 93 | . if empty(PYTHON_VERSIONS_INCOMPATIBLE:M${pv}) |
94 | _PYTHON_VERSION_${pv}_OK= yes | | 94 | _PYTHON_VERSION_${pv}_OK= yes |
95 | _PYTHON_VERSIONS_ACCEPTED+= ${pv} | | 95 | _PYTHON_VERSIONS_ACCEPTED+= ${pv} |
96 | . endif | | 96 | . endif |
97 | .endfor | | 97 | .endfor |
98 | | | 98 | |
99 | # | | 99 | # |
100 | # choose a python version where to add, | | 100 | # choose a python version where to add, |
101 | # try to be intelligent | | 101 | # try to be intelligent |
102 | # | | 102 | # |
103 | # if a version is explicitely required, take it | | 103 | # if a version is explicitly required, take it |
104 | .if defined(PYTHON_VERSION_REQD) | | 104 | .if defined(PYTHON_VERSION_REQD) |
105 | # but check if it is acceptable first, error out otherwise | | 105 | # but check if it is acceptable first, error out otherwise |
106 | . if defined(_PYTHON_VERSION_${PYTHON_VERSION_REQD}_OK) | | 106 | . if defined(_PYTHON_VERSION_${PYTHON_VERSION_REQD}_OK) |
107 | _PYTHON_VERSION= ${PYTHON_VERSION_REQD} | | 107 | _PYTHON_VERSION= ${PYTHON_VERSION_REQD} |
108 | . endif | | 108 | . endif |
109 | .else | | 109 | .else |
110 | # if the default is accepted, it is first choice | | 110 | # if the default is accepted, it is first choice |
111 | . if !defined(_PYTHON_VERSION) | | 111 | . if !defined(_PYTHON_VERSION) |
112 | . if defined(_PYTHON_VERSION_${PYTHON_VERSION_DEFAULT}_OK) | | 112 | . if defined(_PYTHON_VERSION_${PYTHON_VERSION_DEFAULT}_OK) |
113 | _PYTHON_VERSION= ${PYTHON_VERSION_DEFAULT} | | 113 | _PYTHON_VERSION= ${PYTHON_VERSION_DEFAULT} |
114 | . endif | | 114 | . endif |
115 | . endif | | 115 | . endif |
116 | # prefer an already installed version, in order of "accepted" | | 116 | # prefer an already installed version, in order of "accepted" |