|  | 
| 22 | 22 | 
 | 
| 23 | 23 | import sphinx_rtd_theme | 
| 24 | 24 | 
 | 
| 25 |  | -sys.path.insert(0, os.path.abspath('../../src')) | 
|  | 25 | +ROOT_PATH = os.path.join("..", "..") | 
|  | 26 | + | 
|  | 27 | +with open(os.path.join(ROOT_PATH, "VERSION"), 'r') as f: | 
|  | 28 | +    package_version = f.read().strip() | 
|  | 29 | + | 
|  | 30 | +sys.path.insert(0, os.path.abspath(os.path.join(ROOT_PATH, 'src'))) | 
| 26 | 31 | 
 | 
| 27 | 32 | 
 | 
| 28 | 33 | # -- General configuration ------------------------------------------------ | 
|  | 
| 58 | 63 | # built documents. | 
| 59 | 64 | # | 
| 60 | 65 | # The short X.Y version. | 
| 61 |  | -version = '' | 
|  | 66 | +version = package_version | 
| 62 | 67 | # The full version, including alpha/beta/rc tags. | 
| 63 |  | -release = '' | 
|  | 68 | +release = package_version | 
| 64 | 69 | 
 | 
| 65 | 70 | # The language for content autogenerated by Sphinx. Refer to documentation | 
| 66 | 71 | # for a list of supported languages. | 
|  | 
| 101 | 106 | # so a file named "default.css" will overwrite the built-in "default.css". | 
| 102 | 107 | html_static_path = [] | 
| 103 | 108 | 
 | 
| 104 |  | -html_extra_path = ['../../ExampleDeck.jpg'] | 
| 105 |  | - | 
| 106 |  | -html_extra_path = ['../../ExampleDeck.jpg'] | 
|  | 109 | +html_extra_path = [os.path.join(ROOT_PATH, 'ExampleDeck.jpg')] | 
| 107 | 110 | 
 | 
| 108 | 111 | # Custom sidebar templates, must be a dictionary that maps document names | 
| 109 | 112 | # to template names. | 
|  | 
| 148 | 151 | # (source start file, target name, title, | 
| 149 | 152 | #  author, documentclass [howto, manual, or own class]). | 
| 150 | 153 | latex_documents = [ | 
| 151 |  | -    (master_doc, 'python-elgato-streamdeck.tex', 'python-elgato-streamdeck Documentation', | 
|  | 154 | +    (master_doc, 'python-elgato-streamdeck.tex', 'StreamDeck Package Documentation', | 
| 152 | 155 |      'Dean Camera', 'manual'), | 
| 153 | 156 | ] | 
| 154 | 157 | 
 | 
|  | 
| 158 | 161 | # One entry per manual page. List of tuples | 
| 159 | 162 | # (source start file, name, description, authors, manual section). | 
| 160 | 163 | man_pages = [ | 
| 161 |  | -    (master_doc, 'python-elgato-streamdeck', 'python-elgato-streamdeck Documentation', | 
|  | 164 | +    (master_doc, 'python-elgato-streamdeck', 'StreamDeck Package Documentation', | 
| 162 | 165 |      [author], 1) | 
| 163 | 166 | ] | 
| 164 | 167 | 
 | 
|  | 
| 169 | 172 | # (source start file, target name, title, author, | 
| 170 | 173 | #  dir menu entry, description, category) | 
| 171 | 174 | texinfo_documents = [ | 
| 172 |  | -    (master_doc, 'python-elgato-streamdeck', 'python-elgato-streamdeck Documentation', | 
| 173 |  | -     author, 'python-elgato-streamdeck', 'One line description of project.', | 
|  | 175 | +    (master_doc, 'python-elgato-streamdeck', 'StreamDeck Package Documentation', | 
|  | 176 | +     author, 'python-elgato-streamdeck', 'Library to control Elgato StreamDeck devices.', | 
| 174 | 177 |      'Miscellaneous'), | 
| 175 | 178 | ] | 
| 176 |  | - | 
| 177 |  | - | 
| 178 |  | - | 
0 commit comments