mirror of
				https://github.com/qemu/qemu.git
				synced 2025-10-31 12:07:31 +00:00 
			
		
		
		
	 9a50594761
			
		
	
	
		9a50594761
		
	
	
	
	
		
			
			SphinxDirective was added with sphinx 1.8 (2018-09-13). Reported-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220104074649.1712440-1-marcandre.lureau@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
		
			
				
	
	
		
			26 lines
		
	
	
		
			692 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			692 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| # D-Bus XML documentation extension, compatibility gunk for <sphinx4
 | |
| #
 | |
| # Copyright (C) 2021, Red Hat Inc.
 | |
| #
 | |
| # SPDX-License-Identifier: LGPL-2.1-or-later
 | |
| #
 | |
| # Author: Marc-André Lureau <marcandre.lureau@redhat.com>
 | |
| """dbus-doc is a Sphinx extension that provides documentation from D-Bus XML."""
 | |
| 
 | |
| from docutils.parsers.rst import Directive
 | |
| from sphinx.application import Sphinx
 | |
| from typing import Any, Dict
 | |
| 
 | |
| 
 | |
| class FakeDBusDocDirective(Directive):
 | |
|     has_content = True
 | |
|     required_arguments = 1
 | |
| 
 | |
|     def run(self):
 | |
|         return []
 | |
| 
 | |
| 
 | |
| def setup(app: Sphinx) -> Dict[str, Any]:
 | |
|     """Register a fake dbus-doc directive with Sphinx"""
 | |
|     app.add_directive("dbus-doc", FakeDBusDocDirective)
 |