summaryrefslogtreecommitdiff
path: root/meta-phosphor
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2020-04-08 18:26:49 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-04-10 18:05:57 +0300
commitf732694ec4945cf7373fab6261bd0262a112d733 (patch)
tree546d4cb9ee8b2fe436604fa2a66a9a5f8ea27594 /meta-phosphor
parenta56471337332261a9af794f163dd134d1fe31e53 (diff)
downloadopenbmc-f732694ec4945cf7373fab6261bd0262a112d733.tar.xz
sdbusplus: remove unused python2 recipe
All recipes consuming sdbus++ have now migrated to the python3 version. Remove the python2 version. (From meta-phosphor rev: bb27bf20fa96141b4ac64262191b9ad0543e8a10) Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Idae08e4354fa75a9acb3036b7ea7b873d396c4b8 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-phosphor')
-rw-r--r--meta-phosphor/recipes-extended/sdbusplus/files/0001-Revert-sdbus-switch-to-python3.patch73
-rw-r--r--meta-phosphor/recipes-extended/sdbusplus/python-sdbus++_git.bb18
-rw-r--r--meta-phosphor/recipes-extended/sdbusplus/python3-sdbus++_git.bb31
-rw-r--r--meta-phosphor/recipes-extended/sdbusplus/sdbus++.inc25
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 09c2c433a9..0000000000
--- 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 de4d6ba419..0000000000
--- 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 829d4964b3..bf815ce03e 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 b5cffb826b..0000000000
--- 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"