From f32f21de44f2b5280c2a339b0917f61f698de66c Mon Sep 17 00:00:00 2001 From: Jeremy Puhlman Date: Thu, 30 Jan 2020 15:28:40 -0800 Subject: python: move appends to a dynamic-layer Signed-off-by: Jeremy Puhlman Signed-off-by: Joe MacDonald --- conf/layer.conf | 2 ++ .../recipes-devtools/python/files/sitecustomize.py | 26 ++++++++++++++++++++++ .../recipes-devtools/python/python_%.bbappend | 1 + .../recipes-devtools/python/python_selinux.inc | 5 +++++ recipes-devtools/python/files/sitecustomize.py | 26 ---------------------- recipes-devtools/python/python_%.bbappend | 1 - recipes-devtools/python/python_selinux.inc | 5 ----- 7 files changed, 34 insertions(+), 32 deletions(-) create mode 100644 dynamic-layers/python2-layer/recipes-devtools/python/files/sitecustomize.py create mode 100644 dynamic-layers/python2-layer/recipes-devtools/python/python_%.bbappend create mode 100644 dynamic-layers/python2-layer/recipes-devtools/python/python_selinux.inc delete mode 100644 recipes-devtools/python/files/sitecustomize.py delete mode 100644 recipes-devtools/python/python_%.bbappend delete mode 100644 recipes-devtools/python/python_selinux.inc diff --git a/conf/layer.conf b/conf/layer.conf index 226a75a..cdee27a 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -11,6 +11,8 @@ BBFILES_DYNAMIC += "openembedded-layer:${LAYERDIR}/dynamic-layers/openembedded-l networking-layer:${LAYERDIR}/dynamic-layers/networking-layer/*/*/*.bbappend \ virtualization-layer:${LAYERDIR}/dynamic-layers/virtualization-layer/recipes*/*/*.bb \ virtualization-layer:${LAYERDIR}/dynamic-layers/virtualization-layer/recipes*/*/*.bbappend \ + meta-python2:${LAYERDIR}/dynamic-layers/python2-layer/recipes*/*/*.bb \ + meta-python2:${LAYERDIR}/dynamic-layers/python2-layer/recipes*/*/*.bbappend \ " BBFILE_COLLECTIONS += "selinux" 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 @@ +# 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/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 @@ +# If selinux enabled, disable handlers to rw command history file +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +inherit selinux + diff --git a/recipes-devtools/python/files/sitecustomize.py b/recipes-devtools/python/files/sitecustomize.py deleted file mode 100644 index d2b71fa..0000000 --- a/recipes-devtools/python/files/sitecustomize.py +++ /dev/null @@ -1,26 +0,0 @@ -# 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_%.bbappend b/recipes-devtools/python/python_%.bbappend deleted file mode 100644 index 7719d3b..0000000 --- a/recipes-devtools/python/python_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', '${BPN}_selinux.inc', '', d)} diff --git a/recipes-devtools/python/python_selinux.inc b/recipes-devtools/python/python_selinux.inc deleted file mode 100644 index bb54a90..0000000 --- a/recipes-devtools/python/python_selinux.inc +++ /dev/null @@ -1,5 +0,0 @@ -# If selinux enabled, disable handlers to rw command history file -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -inherit selinux - -- cgit v1.2.3-54-g00ecf