| @@ -1,74 +1,73 @@ | | | @@ -1,74 +1,73 @@ |
1 | # $NetBSD: versioned_dependencies.mk,v 1.81 2022/07/20 22:58:17 wiz Exp $ | | 1 | # $NetBSD: versioned_dependencies.mk,v 1.82 2022/07/20 23:04:56 wiz Exp $ |
2 | # | | 2 | # |
3 | # This file determines which separate distribution of a Python | | 3 | # This file determines which separate distribution of a Python |
4 | # package is used as dependency, depending on the Python version | | 4 | # package is used as dependency, depending on the Python version |
5 | # used. | | 5 | # used. |
6 | # | | 6 | # |
7 | # === User-settable variables === | | 7 | # === User-settable variables === |
8 | # | | 8 | # |
9 | # PYTHON_VERSIONED_DEPENDENCIES | | 9 | # PYTHON_VERSIONED_DEPENDENCIES |
10 | # The Python package which should be added as a dependency. | | 10 | # The Python package which should be added as a dependency. |
11 | # | | 11 | # |
12 | # Possible values: Pillow X cairo chardet click cryptography flake8 html2text hypothesis importlib-metadata jinja2 lama markdown mccabe more-itertools pip packaging pygments pyphen rsa setuptools setuptools_scm test twisted | | 12 | # Possible values: Pillow X cairo chardet click cryptography flake8 hypothesis importlib-metadata jinja2 lama markdown mccabe more-itertools pip packaging pygments pyphen rsa setuptools setuptools_scm test twisted |
13 | # Default: (nothing) | | 13 | # Default: (nothing) |
14 | # | | 14 | # |
15 | | | 15 | |
16 | .include "../../lang/python/pyversion.mk" | | 16 | .include "../../lang/python/pyversion.mk" |
17 | | | 17 | |
18 | # format: short name for PYTHON_VERSIONED_DEPENDENCIES<space>Python-2.x path<space>Python-3.x path | | 18 | # format: short name for PYTHON_VERSIONED_DEPENDENCIES<space>Python-2.x path<space>Python-3.x path |
19 | _SUPPORTED_PACKAGES= # empty | | 19 | _SUPPORTED_PACKAGES= # empty |
20 | _SUPPORTED_PACKAGES+= Pillow graphics/py-Pillow6 graphics/py-Pillow | | 20 | _SUPPORTED_PACKAGES+= Pillow graphics/py-Pillow6 graphics/py-Pillow |
21 | _SUPPORTED_PACKAGES+= X textproc/py-X2 textproc/py-X | | 21 | _SUPPORTED_PACKAGES+= X textproc/py-X2 textproc/py-X |
22 | _SUPPORTED_PACKAGES+= cairo graphics/py-cairo118 graphics/py-cairo | | 22 | _SUPPORTED_PACKAGES+= cairo graphics/py-cairo118 graphics/py-cairo |
23 | _SUPPORTED_PACKAGES+= chardet converters/py-chardet4 converters/py-chardet | | 23 | _SUPPORTED_PACKAGES+= chardet converters/py-chardet4 converters/py-chardet |
24 | _SUPPORTED_PACKAGES+= click devel/py-click7 devel/py-click | | 24 | _SUPPORTED_PACKAGES+= click devel/py-click7 devel/py-click |
25 | _SUPPORTED_PACKAGES+= cryptography security/py27-cryptography security/py-cryptography | | 25 | _SUPPORTED_PACKAGES+= cryptography security/py27-cryptography security/py-cryptography |
26 | _SUPPORTED_PACKAGES+= flake8 devel/py-flake8-3 devel/py-flake8 | | 26 | _SUPPORTED_PACKAGES+= flake8 devel/py-flake8-3 devel/py-flake8 |
27 | _SUPPORTED_PACKAGES+= html2text textproc/py-html2text-2019.8.11 textproc/py-html2text | | | |
28 | _SUPPORTED_PACKAGES+= hypothesis devel/py-hypothesis4 devel/py-hypothesis | | 27 | _SUPPORTED_PACKAGES+= hypothesis devel/py-hypothesis4 devel/py-hypothesis |
29 | _SUPPORTED_PACKAGES+= importlib-metadata devel/py-importlib-metadata2 devel/py-importlib-metadata | | 28 | _SUPPORTED_PACKAGES+= importlib-metadata devel/py-importlib-metadata2 devel/py-importlib-metadata |
30 | _SUPPORTED_PACKAGES+= isort devel/py-isort4 devel/py-isort | | 29 | _SUPPORTED_PACKAGES+= isort devel/py-isort4 devel/py-isort |
31 | _SUPPORTED_PACKAGES+= jinja2 textproc/py27-jinja2 textproc/py-jinja2 | | 30 | _SUPPORTED_PACKAGES+= jinja2 textproc/py27-jinja2 textproc/py-jinja2 |
32 | _SUPPORTED_PACKAGES+= lama devel/py-lama7 devel/py-lama | | 31 | _SUPPORTED_PACKAGES+= lama devel/py-lama7 devel/py-lama |
33 | _SUPPORTED_PACKAGES+= markdown textproc/py-markdown3 textproc/py-markdown | | 32 | _SUPPORTED_PACKAGES+= markdown textproc/py-markdown3 textproc/py-markdown |
34 | _SUPPORTED_PACKAGES+= mccabe devel/py-mccabe06 devel/py-mccabe | | 33 | _SUPPORTED_PACKAGES+= mccabe devel/py-mccabe06 devel/py-mccabe |
35 | _SUPPORTED_PACKAGES+= more-itertools devel/py-more-itertools2 devel/py-more-itertools | | 34 | _SUPPORTED_PACKAGES+= more-itertools devel/py-more-itertools2 devel/py-more-itertools |
36 | _SUPPORTED_PACKAGES+= packaging devel/py-packaging2 devel/py-packaging | | 35 | _SUPPORTED_PACKAGES+= packaging devel/py-packaging2 devel/py-packaging |
37 | _SUPPORTED_PACKAGES+= pip devel/py-pip20 devel/py-pip | | 36 | _SUPPORTED_PACKAGES+= pip devel/py-pip20 devel/py-pip |
38 | _SUPPORTED_PACKAGES+= pygments textproc/py-pygments25 textproc/py-pygments | | 37 | _SUPPORTED_PACKAGES+= pygments textproc/py-pygments25 textproc/py-pygments |
39 | _SUPPORTED_PACKAGES+= pyphen textproc/py27-pyphen textproc/py-pyphen | | 38 | _SUPPORTED_PACKAGES+= pyphen textproc/py27-pyphen textproc/py-pyphen |
40 | _SUPPORTED_PACKAGES+= rsa security/py-rsa40 security/py-rsa | | 39 | _SUPPORTED_PACKAGES+= rsa security/py-rsa40 security/py-rsa |
41 | _SUPPORTED_PACKAGES+= setuptools devel/py-setuptools44 devel/py-setuptools | | 40 | _SUPPORTED_PACKAGES+= setuptools devel/py-setuptools44 devel/py-setuptools |
42 | _SUPPORTED_PACKAGES+= setuptools_scm devel/py-setuptools_scm5 devel/py-setuptools_scm | | 41 | _SUPPORTED_PACKAGES+= setuptools_scm devel/py-setuptools_scm5 devel/py-setuptools_scm |
43 | _SUPPORTED_PACKAGES+= test devel/py-test4 devel/py-test | | 42 | _SUPPORTED_PACKAGES+= test devel/py-test4 devel/py-test |
44 | _SUPPORTED_PACKAGES+= twisted net/py-twisted19 net/py-twisted | | 43 | _SUPPORTED_PACKAGES+= twisted net/py-twisted19 net/py-twisted |
45 | | | 44 | |
46 | .for pattern in ${PYTHON_VERSIONED_DEPENDENCIES} | | 45 | .for pattern in ${PYTHON_VERSIONED_DEPENDENCIES} |
47 | _PKG_MATCHED= no | | 46 | _PKG_MATCHED= no |
48 | pkg:= ${pattern:C/:.*//} | | 47 | pkg:= ${pattern:C/:.*//} |
49 | type:= ${pattern:C/[^:]*//} | | 48 | type:= ${pattern:C/[^:]*//} |
50 | . for name py2dir py3dir in ${_SUPPORTED_PACKAGES} | | 49 | . for name py2dir py3dir in ${_SUPPORTED_PACKAGES} |
51 | . if "${pkg}" == "${name}" | | 50 | . if "${pkg}" == "${name}" |
52 | _PKG_MATCHED= yes | | 51 | _PKG_MATCHED= yes |
53 | . if ${_PYTHON_VERSION} == 27 | | 52 | . if ${_PYTHON_VERSION} == 27 |
54 | dir:= ${py2dir} | | 53 | dir:= ${py2dir} |
55 | . else | | 54 | . else |
56 | dir:= ${py3dir} | | 55 | dir:= ${py3dir} |
57 | . endif | | 56 | . endif |
58 | . if "${type}" == ":link" | | 57 | . if "${type}" == ":link" |
59 | .include "../../${dir}/buildlink3.mk" | | 58 | .include "../../${dir}/buildlink3.mk" |
60 | . elif "${type}" == ":build" | | 59 | . elif "${type}" == ":build" |
61 | BUILD_DEPENDS:= ${BUILD_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} | | 60 | BUILD_DEPENDS:= ${BUILD_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} |
62 | . elif "${type}" == ":test" | | 61 | . elif "${type}" == ":test" |
63 | TEST_DEPENDS:= ${TEST_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} | | 62 | TEST_DEPENDS:= ${TEST_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} |
64 | . elif "${type}" == ":tool" | | 63 | . elif "${type}" == ":tool" |
65 | TOOL_DEPENDS:= ${TOOL_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} | | 64 | TOOL_DEPENDS:= ${TOOL_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} |
66 | . else | | 65 | . else |
67 | DEPENDS:= ${DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} | | 66 | DEPENDS:= ${DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} |
68 | . endif | | 67 | . endif |
69 | . endif | | 68 | . endif |
70 | . endfor | | 69 | . endfor |
71 | . if ${_PKG_MATCHED} == "no" | | 70 | . if ${_PKG_MATCHED} == "no" |
72 | PKG_FAIL_REASON+= "${pkg} unsupported in PYTHON_VERSIONED_DEPENDENCIES" | | 71 | PKG_FAIL_REASON+= "${pkg} unsupported in PYTHON_VERSIONED_DEPENDENCIES" |
73 | . endif | | 72 | . endif |
74 | .endfor | | 73 | .endfor |