From 225cd19788af71f2bd5c7d2695c9ea434af6735b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Mon, 7 Feb 2022 17:18:10 +0100 Subject: [PATCH] add setters to build dir spec --- PyTeX/build/build/build_dir_spec.py | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/PyTeX/build/build/build_dir_spec.py b/PyTeX/build/build/build_dir_spec.py index 9d123d9..9846557 100644 --- a/PyTeX/build/build/build_dir_spec.py +++ b/PyTeX/build/build/build_dir_spec.py @@ -14,7 +14,7 @@ class BuildDirSpecification: self._pytex_source_root: Optional[Path] = source_root self._build_root: Optional[Path] = build_root self._doc_root: Optional[Path] = doc_root - self._tex_root: Optional[Path] = tex_root + self._tex_source_root: Optional[Path] = tex_root self._wrapper_dir: Optional[PurePath] = wrapper_dir @property @@ -24,6 +24,10 @@ class BuildDirSpecification: else: return self._build_root + @build_root.setter + def build_root(self, build_root: Path): + self._build_root = build_root + @property def doc_root(self) -> Path: if self._doc_root is None: @@ -31,6 +35,10 @@ class BuildDirSpecification: else: return self._doc_root + @doc_root.setter + def doc_root(self, doc_root: Path): + self._doc_root = doc_root + @property def pytex_source_root(self) -> Path: if self._pytex_source_root is None: @@ -38,12 +46,20 @@ class BuildDirSpecification: else: return self._pytex_source_root + @pytex_source_root.setter + def pytex_source_root(self, pytex_source_root: Path): + self._pytex_source_root = pytex_source_root + @property def tex_source_root(self) -> Path: - if self._tex_root is None: + if self._tex_source_root is None: return Path('build/source') else: - return self._tex_root + return self._tex_source_root + + @tex_source_root.setter + def tex_source_root(self, tex_source_root: Path): + self._tex_source_root = tex_source_root @property def wrapper_dir(self) -> PurePath: @@ -52,4 +68,6 @@ class BuildDirSpecification: else: return self._wrapper_dir - + @wrapper_dir.setter + def wrapper_dir(self, wrapper_dir: Path): + self._wrapper_dir = wrapper_dir