:py:mod:`platform_db` ===================== .. py:module:: platform_db .. autoapi-nested-parse:: Platform database. Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 knowledge_base/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: platform_db.KnowledgeBase platform_db.PlatformDBPlugin platform_db.AmberCPUSupport Functions ~~~~~~~~~ .. autoapisummary:: platform_db.get_knowledge_base Attributes ~~~~~~~~~~ .. autoapisummary:: platform_db.PlatformDBEntry .. py:data:: PlatformDBEntry .. py:class:: KnowledgeBase Container for platform detection knowledge base entries. .. py:attribute:: cpu_info :type: PlatformDBEntry .. py:attribute:: os_info :type: PlatformDBEntry .. py:attribute:: platform_info :type: PlatformDBEntry .. py:attribute:: build_targets :type: PlatformDBEntry .. py:attribute:: host_guess :type: PlatformDBEntry .. py:class:: PlatformDBPlugin Bases: :py:obj:`KnowledgeBase` Plugin API to extend the platform knowledge base. To create a plugin, override this class and the method ``update_db``. In ``update_db`` modify the values of self.cpu_info, self.os_info, self.platform_info, self.build_targets, and self.host_guess. Then add an entry points in your package in the group e3.platform_db and reference your new class. e.g.:: entry_points={ 'e3.platform_db': [ 'my_db = e3.mypackage.platform_db:MyPlatformDBPlugin']} .. py:method:: update_db() -> None :abstractmethod: Update database with current state. .. py:class:: AmberCPUSupport Bases: :py:obj:`PlatformDBPlugin` Plugin example adding support for Amber CPUs. .. py:method:: update_db() -> None Add support for Amber CPUs. .. py:function:: get_knowledge_base() -> KnowledgeBase Load the knowledge base, including all content from plugins. :return: The knowledge base with the keys (cpu_info, os_info, platform_info, build_targets, host_guess)