[oe-commits] [openembedded-core] 21/21: python: add tk support

git at git.openembedded.org git at git.openembedded.org
Fri Nov 23 11:21:17 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit dc7530f772a8c307cbd47c7a3276f514f7b430ea
Author: Mingli Yu <Mingli.Yu at windriver.com>
AuthorDate: Wed Nov 14 17:38:16 2018 +0800

    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
     >>>
    
    Signed-off-by: Mingli Yu <Mingli.Yu at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-devtools/python/python/python2-manifest.json | 3 ++-
 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 260fa6f..a9f3924 100644
--- a/meta/recipes-devtools/python/python/python2-manifest.json
+++ b/meta/recipes-devtools/python/python/python2-manifest.json
@@ -966,6 +966,7 @@
             "core"
         ], 
         "files": [
+            "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/_tkinter.so",
             "${libdir}/python2.7/lib-tk"
         ]
     }, 
@@ -1043,4 +1044,4 @@
             "${libdir}/python2.7/lib-dynload/zlib.so"
         ]
     }
-}
\ No newline at end of file
+}
diff --git a/meta/recipes-devtools/python/python_2.7.15.bb b/meta/recipes-devtools/python/python_2.7.15.bb
index dd969d8..6a60aa7 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 += "\
   file://setuptweaks.patch \
   file://check-if-target-is-64b-not-host.patch \
   file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
-  file://avoid_warning_about_tkinter.patch \
+  ${@bb.utils.contains('PACKAGECONFIG', 'tk', '', 'file://avoid_warning_about_tkinter.patch', d)} \
   file://avoid_warning_for_sunos_specific_module.patch \
   file://python-2.7.3-remove-bsdb-rpath.patch \
   file://run-ptest \
@@ -45,6 +45,7 @@ EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
 
 PACKAGECONFIG ??= "bdb"
 PACKAGECONFIG[bdb] = ",,db"
+PACKAGECONFIG[tk] = ",,tk"
 
 do_configure_append() {
 	rm -f ${S}/Makefile.orig
@@ -172,7 +173,7 @@ RDEPENDS_${PN}-modules += "${PN}-misc"
 
 # ptest
 RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip"
-
+RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk', '', d)}"
 # catch manpage
 PACKAGES += "${PN}-man"
 FILES_${PN}-man = "${datadir}/man"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list