| @@ -1,53 +1,56 @@ | | | @@ -1,53 +1,56 @@ |
1 | # $NetBSD: versioned_dependencies.mk,v 1.33 2018/09/05 08:22:46 adam Exp $ | | 1 | # $NetBSD: versioned_dependencies.mk,v 1.34 2019/10/21 21:08:56 adam 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: Pmw X cherrypy dialog ipython jsonlib python-digest | | 12 | # Possible values: Pmw X cherrypy dialog ipython jsonlib python-digest sphinx |
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 | _SUPPORTED_PACKAGES= # empty | | 18 | _SUPPORTED_PACKAGES= # empty |
19 | _SUPPORTED_PACKAGES+= Pmw x11/py-Pmw x11/py-Pmw2 | | 19 | _SUPPORTED_PACKAGES+= Pmw x11/py-Pmw x11/py-Pmw2 |
20 | _SUPPORTED_PACKAGES+= X textproc/py-X2 textproc/py-X | | 20 | _SUPPORTED_PACKAGES+= X textproc/py-X2 textproc/py-X |
21 | _SUPPORTED_PACKAGES+= cherrypy www/py-cherrypy17 www/py-cherrypy | | 21 | _SUPPORTED_PACKAGES+= cherrypy www/py-cherrypy17 www/py-cherrypy |
22 | _SUPPORTED_PACKAGES+= dialog devel/py-dialog2 devel/py-dialog | | 22 | _SUPPORTED_PACKAGES+= dialog devel/py-dialog2 devel/py-dialog |
23 | _SUPPORTED_PACKAGES+= ipython devel/py-ipython5 devel/py-ipython | | 23 | _SUPPORTED_PACKAGES+= ipython devel/py-ipython5 devel/py-ipython |
24 | _SUPPORTED_PACKAGES+= jsonlib textproc/py-jsonlib textproc/py-jsonlib3 | | 24 | _SUPPORTED_PACKAGES+= jsonlib textproc/py-jsonlib textproc/py-jsonlib3 |
25 | _SUPPORTED_PACKAGES+= python-digest www/py-python-digest www/py-python3-digest | | 25 | _SUPPORTED_PACKAGES+= python-digest www/py-python-digest www/py-python3-digest |
| | | 26 | _SUPPORTED_PACKAGES+= sphinx textproc/py-sphinx1 textproc/py-sphinx |
26 | | | 27 | |
27 | .for pattern in ${PYTHON_VERSIONED_DEPENDENCIES} | | 28 | .for pattern in ${PYTHON_VERSIONED_DEPENDENCIES} |
28 | _PKG_MATCHED= no | | 29 | _PKG_MATCHED= no |
29 | pkg:= ${pattern:C/:.*//} | | 30 | pkg:= ${pattern:C/:.*//} |
30 | type:= ${pattern:C/[^:]*//} | | 31 | type:= ${pattern:C/[^:]*//} |
31 | . for name py2dir py3dir in ${_SUPPORTED_PACKAGES} | | 32 | . for name py2dir py3dir in ${_SUPPORTED_PACKAGES} |
32 | . if "${pkg}" == "${name}" | | 33 | . if "${pkg}" == "${name}" |
33 | _PKG_MATCHED= yes | | 34 | _PKG_MATCHED= yes |
34 | . if ${PYPKGPREFIX} == "py27" | | 35 | . if ${PYPKGPREFIX} == "py27" |
35 | dir:= ${py2dir} | | 36 | dir:= ${py2dir} |
36 | . else | | 37 | . else |
37 | dir:= ${py3dir} | | 38 | dir:= ${py3dir} |
38 | . endif | | 39 | . endif |
39 | . if "${type}" == ":link" | | 40 | . if "${type}" == ":link" |
40 | .include "../../${dir}/buildlink3.mk" | | 41 | .include "../../${dir}/buildlink3.mk" |
41 | . elif "${type}" == ":build" | | 42 | . elif "${type}" == ":build" |
42 | BUILD_DEPENDS:= ${BUILD_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} | | 43 | BUILD_DEPENDS:= ${BUILD_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} |
43 | . elif "${type}" == ":test" | | 44 | . elif "${type}" == ":test" |
44 | TEST_DEPENDS:= ${TEST_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} | | 45 | TEST_DEPENDS:= ${TEST_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} |
| | | 46 | . elif "${type}" == ":tool" |
| | | 47 | TOOL_DEPENDS:= ${TOOL_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} |
45 | . else | | 48 | . else |
46 | DEPENDS:= ${DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} | | 49 | DEPENDS:= ${DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir} |
47 | . endif | | 50 | . endif |
48 | . endif | | 51 | . endif |
49 | . endfor | | 52 | . endfor |
50 | . if ${_PKG_MATCHED} == "no" | | 53 | . if ${_PKG_MATCHED} == "no" |
51 | PKG_FAIL_REASON+= "${pkg} unsupported in PYTHON_VERSIONED_DEPENDENCIES" | | 54 | PKG_FAIL_REASON+= "${pkg} unsupported in PYTHON_VERSIONED_DEPENDENCIES" |
52 | . endif | | 55 | . endif |
53 | .endfor | | 56 | .endfor |