diff options
4 files changed, 30 insertions, 117 deletions
diff --git a/meta-phosphor/recipes-extended/sdbusplus/files/0001-Revert-sdbus-switch-to-python3.patch b/meta-phosphor/recipes-extended/sdbusplus/files/0001-Revert-sdbus-switch-to-python3.patch deleted file mode 100644 index 09c2c433a..000000000 --- a/meta-phosphor/recipes-extended/sdbusplus/files/0001-Revert-sdbus-switch-to-python3.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 8729226fb79d49129c8349645e0f8ec381f14be8 Mon Sep 17 00:00:00 2001 -From: Patrick Williams <patrick@stwcx.xyz> -Date: Wed, 1 Apr 2020 08:48:05 -0500 -Subject: [PATCH] Revert "sdbus++: switch to python3" - -This reverts commit 18ce803d1e2a6a1779d38f7bf5279901b02583e0. ---- - configure.ac | 2 +- - tools/sdbus++ | 8 ++++++-- - tools/sdbusplus/namedelement.py | 4 ++-- - 3 files changed, 9 insertions(+), 5 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ec65562..11c189b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -29,7 +29,7 @@ AC_PROG_INSTALL - AC_PROG_MAKE_SET - - # setup sdbus++ --AM_PATH_PYTHON([3.0], [AC_SUBST([PYTHON], [echo "$PYTHON"])]) -+AM_PATH_PYTHON([2.7], [AC_SUBST([PYTHON], [echo "$PYTHON"])]) - AC_SUBST([PYTHONDIR], ${pythondir}) - AS_IF([test "$PYTHON" != :], [have_python=yes], [have_python=no]) - -diff --git a/tools/sdbus++ b/tools/sdbus++ -index fa12677..6cfcb9e 100755 ---- a/tools/sdbus++ -+++ b/tools/sdbus++ -@@ -1,4 +1,4 @@ --#!/usr/bin/env python3 -+#!/usr/bin/env python - import sdbusplus - import mako.lookup - import argparse -@@ -35,7 +35,11 @@ def main(): - - args = parser.parse_args() - -- lookup = mako.lookup.TemplateLookup(directories=[args.templatedir]) -+ if sys.version_info < (3, 0): -+ lookup = mako.lookup.TemplateLookup(directories=[args.templatedir], -+ disable_unicode=True) -+ else: -+ lookup = mako.lookup.TemplateLookup(directories=[args.templatedir]) - - instance = valid_types[args.typeName].load(args.item, args.rootdir) - function = getattr(instance, valid_processes[args.process]) -diff --git a/tools/sdbusplus/namedelement.py b/tools/sdbusplus/namedelement.py -index 1548ef0..5048654 100644 ---- a/tools/sdbusplus/namedelement.py -+++ b/tools/sdbusplus/namedelement.py -@@ -7,7 +7,7 @@ class NamedElement(object): - self.name = kwargs.pop('name', "unnamed") - self.description = kwargs.pop('description', "") - -- def __getattribute__(self, name): -+ def __getattr__(self, name): - l = {'CamelCase': lambda: inflection.camelize(self.name), - 'camelCase': lambda: inflection.camelize(self.name, False), - 'snake_case': lambda: inflection.underscore(self.name)}\ -@@ -16,7 +16,7 @@ class NamedElement(object): - if l: - return NamedElement.__fixup_name(l()) - try: -- return super(NamedElement, self).__getattribute__(name) -+ return super(NamedElement, self).__getattr__(name) - except: - raise AttributeError("Attribute '%s' not found in %s.NamedElement" - % (name, self.__module__)) --- -2.24.1 - diff --git a/meta-phosphor/recipes-extended/sdbusplus/python-sdbus++_git.bb b/meta-phosphor/recipes-extended/sdbusplus/python-sdbus++_git.bb deleted file mode 100644 index de4d6ba41..000000000 --- a/meta-phosphor/recipes-extended/sdbusplus/python-sdbus++_git.bb +++ /dev/null @@ -1,18 +0,0 @@ -inherit obmc-phosphor-python-autotools -include sdbus++.inc - -SRC_URI += "file://0001-Revert-sdbus-switch-to-python3.patch" - -# Provide these aliases temporarily until everyone can move over to the -# new package name. -PROVIDES_class-native += "sdbusplus-native sdbus++-native" -PROVIDES_class-nativesdk += "sdbusplus-nativesdk sdbus++-nativesdk" - -# If anyone wanted the sdbus++ executable, make them use the python3 version. -# This avoids issues where both packages attempt to install the executable -# into /usr/bin. -DEPENDS += "python3-sdbus++-native" -do_install_append() { - rm ${D}${bindir}/sdbus++ - rmdir ${D}${bindir} || true -} diff --git a/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb b/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb index 829d4964b..bf815ce03 100644 --- a/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb +++ b/meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb @@ -1,2 +1,31 @@ +SUMMARY = "sdbus++ dbus API / binding generator" +DESCRIPTION = "Generates bindings against sdbusplus for dbus APIs" + +inherit autotools pkgconfig inherit obmc-phosphor-python3-autotools -include sdbus++.inc + +include sdbusplus-rev.inc + +# Provide these aliases temporarily until everyone can move over to the +# new package name. +PROVIDES_class-native += "sdbusplus-native" +PROVIDES_class-nativesdk += "sdbusplus-nativesdk" + +DEPENDS += " \ + autoconf-archive-native \ + ${PYTHON_PN}-inflection-native \ + ${PYTHON_PN}-mako-native \ + ${PYTHON_PN}-pyyaml-native \ + " + +RDEPENDS_${PN} += " \ + ${PYTHON_PN}-inflection \ + ${PYTHON_PN}-mako \ + ${PYTHON_PN}-pyyaml \ + " + +PACKAGECONFIG ??= "transaction" +PACKAGECONFIG[libsdbusplus] = "--enable-libsdbusplus,--disable-libsdbusplus,systemd,libsystemd" +PACKAGECONFIG[transaction] = "--enable-transaction,--disable-transaction" + +BBCLASSEXTEND += "native nativesdk" diff --git a/meta-phosphor/recipes-extended/sdbusplus/sdbus++.inc b/meta-phosphor/recipes-extended/sdbusplus/sdbus++.inc deleted file mode 100644 index b5cffb826..000000000 --- a/meta-phosphor/recipes-extended/sdbusplus/sdbus++.inc +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "sdbus++ dbus API / binding generator" -DESCRIPTION = "Generates bindings against sdbusplus for dbus APIs" - -inherit autotools pkgconfig - -include sdbusplus-rev.inc - -DEPENDS += " \ - autoconf-archive-native \ - ${PYTHON_PN}-inflection-native \ - ${PYTHON_PN}-mako-native \ - ${PYTHON_PN}-pyyaml-native \ - " - -RDEPENDS_${PN} += " \ - ${PYTHON_PN}-inflection \ - ${PYTHON_PN}-mako \ - ${PYTHON_PN}-pyyaml \ - " - -PACKAGECONFIG ??= "transaction" -PACKAGECONFIG[libsdbusplus] = "--enable-libsdbusplus,--disable-libsdbusplus,systemd,libsystemd" -PACKAGECONFIG[transaction] = "--enable-transaction,--disable-transaction" - -BBCLASSEXTEND += "native nativesdk" |