diff --git a/recipes-devtools/python/python/sitecustomize.py b/recipes-devtools/python/python/sitecustomize.py new file mode 100644 index 0000000..d2b71fa --- /dev/null +++ b/recipes-devtools/python/python/sitecustomize.py @@ -0,0 +1,26 @@ +# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer +# GPLv2 or later +# Version: 20081123 +# Features: +# * set proper default encoding +# Features removed for SELinux: +# * enable readline completion in the interactive interpreter +# * load command line history on startup +# * save command line history on exit + +import os + +def __enableDefaultEncoding(): + import sys + try: + sys.setdefaultencoding( "utf8" ) + except LookupError: + pass + +import sys +try: + import rlcompleter, readline +except ImportError: + pass +else: + __enableDefaultEncoding() diff --git a/recipes-devtools/python/python_2.7.2.bbappend b/recipes-devtools/python/python_2.7.2.bbappend new file mode 100644 index 0000000..b8447e9 --- /dev/null +++ b/recipes-devtools/python/python_2.7.2.bbappend @@ -0,0 +1,5 @@ +PR .= ".1" + +inherit selinux +# If selinux enabled, disable handlers to rw command history file +FILESEXTRAPATHS_prepend := "${@target_selinux(d, '${THISDIR}/${PN}:')}"