conf.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. import datetime
  2. import pathlib
  3. import sys
  4. base = pathlib.Path(__file__).parent.parent.parent
  5. root = base.__str__()
  6. flipperzero = base.joinpath('flipperzero').__str__()
  7. sys.path.append(root)
  8. sys.path.append(flipperzero)
  9. def copy_dict(source, target):
  10. for key, value in source.__dict__.items():
  11. target.__dict__[key] = value
  12. import flipperzero.logging
  13. import logging
  14. copy_dict(flipperzero.logging, logging)
  15. import flipperzero.io
  16. import io
  17. copy_dict(flipperzero.io, io)
  18. now = datetime.datetime.now()
  19. project = 'uPython'
  20. copyright = str(now.year) + ', Oliver Fabel'
  21. author = 'Oliver Fabel'
  22. release = '1.5.0'
  23. version = '1.5'
  24. language = 'en'
  25. extensions = [
  26. 'sphinx.ext.autodoc',
  27. 'myst_parser'
  28. ]
  29. source_suffix = {
  30. '.rst': 'restructuredtext',
  31. '.md': 'markdown'
  32. }
  33. templates_path = [
  34. 'templates'
  35. ]
  36. exclude_patterns = []
  37. include_patterns = [
  38. '**'
  39. ]
  40. html_theme = 'alabaster'
  41. html_theme_options = {
  42. 'show_powered_by': False,
  43. 'extra_nav_links': {
  44. 'Source Code': 'https://www.github.com/ofabel/mp-flipper',
  45. 'Bugtracker': 'https://www.github.com/ofabel/mp-flipper/issues',
  46. 'Releases': 'https://lab.flipper.net/apps/upython'
  47. }
  48. }
  49. html_scaled_image_link = False
  50. html_copy_source = False
  51. html_show_copyright = False
  52. html_show_sphinx = False
  53. html_static_path = [
  54. 'static'
  55. ]
  56. html_logo = 'assets/logo.png'
  57. html_favicon = 'assets/favicon.png'
  58. autodoc_default_options = {
  59. 'member-order': 'bysource',
  60. }
  61. add_module_names = True
  62. maximum_signature_line_length = 50