diff options
author | Mingli Yu <Mingli.Yu@windriver.com> | 2018-11-14 17:38:16 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-23 23:35:19 +0000 |
commit | 8b7c98e0e0ae4718ed56500f913ca886df5a883d (patch) | |
tree | 6e735cce0c2a4ae9c757eb8fcfc126db7f17ea4e | |
parent | 75d2d6776b434e998c0ad7ef531ce179d1595e7d (diff) | |
download | poky-8b7c98e0e0ae4718ed56500f913ca886df5a883d.tar.gz |
python: add tk support
Add support to enable tk via PACKGECONFIG.
before the patch:
# python
Python 2.7.15 (default, Nov 8 2018, 04:53:50)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tkinter
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.7/lib-tk/Tkinter.py", line 39, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
>>>
After the patch, if enable tk in PACKGECONFIG, then
# python
Python 2.7.15 (default, Oct 25 2018, 08:12:45)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Tkinter
>>>
(From OE-Core rev: 26b2702475697c123937d237e00c34eb2216b5ea)
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-devtools/python/python/python2-manifest.json | 3 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python_2.7.15.bb | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/meta/recipes-devtools/python/python/python2-manifest.json b/meta/recipes-devtools/python/python/python2-manifest.json index 260fa6f80d..a9f392475c 100644 --- a/meta/recipes-devtools/python/python/python2-manifest.json +++ b/meta/recipes-devtools/python/python/python2-manifest.json | |||
@@ -966,6 +966,7 @@ | |||
966 | "core" | 966 | "core" |
967 | ], | 967 | ], |
968 | "files": [ | 968 | "files": [ |
969 | "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.so", | ||
969 | "${libdir}/python2.7/lib-tk" | 970 | "${libdir}/python2.7/lib-tk" |
970 | ] | 971 | ] |
971 | }, | 972 | }, |
@@ -1043,4 +1044,4 @@ | |||
1043 | "${libdir}/python2.7/lib-dynload/zlib.so" | 1044 | "${libdir}/python2.7/lib-dynload/zlib.so" |
1044 | ] | 1045 | ] |
1045 | } | 1046 | } |
1046 | } \ No newline at end of file | 1047 | } |
diff --git a/meta/recipes-devtools/python/python_2.7.15.bb b/meta/recipes-devtools/python/python_2.7.15.bb index dd969d8e7e..6a60aa7f5b 100644 --- a/meta/recipes-devtools/python/python_2.7.15.bb +++ b/meta/recipes-devtools/python/python_2.7.15.bb | |||
@@ -21,7 +21,7 @@ SRC_URI += "\ | |||
21 | file://setuptweaks.patch \ | 21 | file://setuptweaks.patch \ |
22 | file://check-if-target-is-64b-not-host.patch \ | 22 | file://check-if-target-is-64b-not-host.patch \ |
23 | file://search_db_h_in_inc_dirs_and_avoid_warning.patch \ | 23 | file://search_db_h_in_inc_dirs_and_avoid_warning.patch \ |
24 | file://avoid_warning_about_tkinter.patch \ | 24 | ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \ |
25 | file://avoid_warning_for_sunos_specific_module.patch \ | 25 | file://avoid_warning_for_sunos_specific_module.patch \ |
26 | file://python-2.7.3-remove-bsdb-rpath.patch \ | 26 | file://python-2.7.3-remove-bsdb-rpath.patch \ |
27 | file://run-ptest \ | 27 | file://run-ptest \ |
@@ -45,6 +45,7 @@ EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no" | |||
45 | 45 | ||
46 | PACKAGECONFIG ??= "bdb" | 46 | PACKAGECONFIG ??= "bdb" |
47 | PACKAGECONFIG[bdb] = ",,db" | 47 | PACKAGECONFIG[bdb] = ",,db" |
48 | PACKAGECONFIG[tk] = ",,tk" | ||
48 | 49 | ||
49 | do_configure_append() { | 50 | do_configure_append() { |
50 | rm -f ${S}/Makefile.orig | 51 | rm -f ${S}/Makefile.orig |
@@ -172,7 +173,7 @@ RDEPENDS_${PN}-modules += "${PN}-misc" | |||
172 | 173 | ||
173 | # ptest | 174 | # ptest |
174 | RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip" | 175 | RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip" |
175 | 176 | RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk', '', d)}" | |
176 | # catch manpage | 177 | # catch manpage |
177 | PACKAGES += "${PN}-man" | 178 | PACKAGES += "${PN}-man" |
178 | FILES_${PN}-man = "${datadir}/man" | 179 | FILES_${PN}-man = "${datadir}/man" |