mirror of
https://git.yoctoproject.org/poky
synced 2026-02-11 19:23:03 +01:00
python3: add tk support
Add support to enable tk via PACKAGECONFIG.
before this patch:
# python3
Python 3.5.6 (default, Nov 8 2018, 04:53:45)
[GCC 8.2.0] on linux
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/python3.5/tkinter/__init__.py", line 35, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named '_tkinter'
>>>
After this patch, if enable tk in PACKAGECONFIG, then
# python3
Python 3.5.6 (default, Nov 8 2018, 03:15:52)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>>
(From OE-Core rev: 4b781d545e7e0b084201cd6a8fad953b0f231513)
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
a596919132
commit
75d2d6776b
@@ -21,7 +21,7 @@ ${DISTRO_SRC_URI} \
|
||||
|
||||
SRC_URI += "\
|
||||
file://03-fix-tkinter-detection.patch \
|
||||
file://avoid_warning_about_tkinter.patch \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \
|
||||
file://cgi_py.patch \
|
||||
file://host_include_contamination.patch \
|
||||
file://python-3.3-multilib.patch \
|
||||
@@ -82,6 +82,7 @@ PACKAGECONFIG ??= "readline ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-userm
|
||||
PACKAGECONFIG[readline] = ",,readline"
|
||||
# Use profile guided optimisation by running PyBench inside qemu-user
|
||||
PACKAGECONFIG[pgo] = "--enable-optimizations"
|
||||
PACKAGECONFIG[tk] = ",,tk"
|
||||
|
||||
do_configure_append() {
|
||||
rm -f ${S}/Makefile.orig
|
||||
@@ -246,7 +247,7 @@ PACKAGES += "${PN}-man"
|
||||
FILES_${PN}-man = "${datadir}/man"
|
||||
|
||||
RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip bzip2"
|
||||
|
||||
RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk', '', d)}"
|
||||
RDEPENDS_${PN}-dev = ""
|
||||
|
||||
BBCLASSEXTEND = "nativesdk"
|
||||
|
||||
Reference in New Issue
Block a user