diff options
Diffstat (limited to 'dynamic-layers/python2-layer/recipes-devtools/python')
3 files changed, 32 insertions, 0 deletions
diff --git a/dynamic-layers/python2-layer/recipes-devtools/python/files/sitecustomize.py b/dynamic-layers/python2-layer/recipes-devtools/python/files/sitecustomize.py new file mode 100644 index 0000000..d2b71fa --- /dev/null +++ b/dynamic-layers/python2-layer/recipes-devtools/python/files/sitecustomize.py | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | # OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de> | ||
| 2 | # GPLv2 or later | ||
| 3 | # Version: 20081123 | ||
| 4 | # Features: | ||
| 5 | # * set proper default encoding | ||
| 6 | # Features removed for SELinux: | ||
| 7 | # * enable readline completion in the interactive interpreter | ||
| 8 | # * load command line history on startup | ||
| 9 | # * save command line history on exit | ||
| 10 | |||
| 11 | import os | ||
| 12 | |||
| 13 | def __enableDefaultEncoding(): | ||
| 14 | import sys | ||
| 15 | try: | ||
| 16 | sys.setdefaultencoding( "utf8" ) | ||
| 17 | except LookupError: | ||
| 18 | pass | ||
| 19 | |||
| 20 | import sys | ||
| 21 | try: | ||
| 22 | import rlcompleter, readline | ||
| 23 | except ImportError: | ||
| 24 | pass | ||
| 25 | else: | ||
| 26 | __enableDefaultEncoding() | ||
diff --git a/dynamic-layers/python2-layer/recipes-devtools/python/python_%.bbappend b/dynamic-layers/python2-layer/recipes-devtools/python/python_%.bbappend new file mode 100644 index 0000000..7719d3b --- /dev/null +++ b/dynamic-layers/python2-layer/recipes-devtools/python/python_%.bbappend | |||
| @@ -0,0 +1 @@ | |||
| require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', '${BPN}_selinux.inc', '', d)} | |||
diff --git a/dynamic-layers/python2-layer/recipes-devtools/python/python_selinux.inc b/dynamic-layers/python2-layer/recipes-devtools/python/python_selinux.inc new file mode 100644 index 0000000..bb54a90 --- /dev/null +++ b/dynamic-layers/python2-layer/recipes-devtools/python/python_selinux.inc | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | # If selinux enabled, disable handlers to rw command history file | ||
| 2 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
| 3 | |||
| 4 | inherit selinux | ||
| 5 | |||
