|
23 | 23 | rst, |
24 | 24 | ) |
25 | 25 | from sphinx.util._importer import import_object |
| 26 | +from sphinx.util._pathlib import _StrPathProperty |
26 | 27 | from sphinx.util.build_phase import BuildPhase |
27 | 28 | from sphinx.util.console import bold |
28 | 29 | from sphinx.util.display import progress_message, status_iterator |
|
48 | 49 | from sphinx.application import Sphinx |
49 | 50 | from sphinx.config import Config |
50 | 51 | from sphinx.events import EventManager |
51 | | - from sphinx.util._pathlib import _StrPath |
52 | 52 | from sphinx.util.tags import Tags |
53 | 53 |
|
54 | 54 |
|
@@ -94,11 +94,16 @@ class Builder: |
94 | 94 | #: The file format produced by the builder allows images to be embedded using data-URIs. |
95 | 95 | supported_data_uri_images: bool = False |
96 | 96 |
|
| 97 | + srcdir = _StrPathProperty() |
| 98 | + confdir = _StrPathProperty() |
| 99 | + outdir = _StrPathProperty() |
| 100 | + doctreedir = _StrPathProperty() |
| 101 | + |
97 | 102 | def __init__(self, app: Sphinx, env: BuildEnvironment) -> None: |
98 | | - self.srcdir: _StrPath = app.srcdir |
99 | | - self.confdir: _StrPath = app.confdir |
100 | | - self.outdir: _StrPath = app.outdir |
101 | | - self.doctreedir: _StrPath = app.doctreedir |
| 103 | + self.srcdir = app.srcdir |
| 104 | + self.confdir = app.confdir |
| 105 | + self.outdir = app.outdir |
| 106 | + self.doctreedir = app.doctreedir |
102 | 107 | ensuredir(self.doctreedir) |
103 | 108 |
|
104 | 109 | self.app: Sphinx = app |
|
0 commit comments