diff options
| author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2024-09-05 10:52:46 +0200 |
|---|---|---|
| committer | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2024-09-19 10:20:58 +0200 |
| commit | c71bbe991fc5faa1327503e06af17fd11d717a76 (patch) | |
| tree | 5673ee4ba7169678fbfebf4592d04c2cb91e5253 /build_scripts/main.py | |
| parent | fe5020b7e218078562c6b9b35d005553f53255fb (diff) | |
Documentation: Release Notes
- Introduces a new section in the navigation pane called "Release Notes"
with subpages for PySide6, Shiboken6, PySide2, and Shiboken2.
- The .md files are auto-generated by the script
`tools/release_notes/main.py` and created in the directory
`sources/pyside6/doc/release_notes/`.
Fixes: PYSIDE-2853
Change-Id: I6def8b526f11a638581f29798dd6917cd435d19c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'build_scripts/main.py')
| -rw-r--r-- | build_scripts/main.py | 39 |
1 files changed, 30 insertions, 9 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py index 60f72d475..4d541b3ac 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -1330,17 +1330,38 @@ class PysideBaseDocs(Command, CommandMixin): raise SetupError(f"Error running CMake for {self.doc_dir}") if self.name == PYSIDE: + def run_script(script_path, args=None): + cmd = [sys.executable, os.fspath(script_path)] + if args: + cmd.extend(args) + if run_process(cmd) != 0: + raise SetupError(f"Error running {script_path}") + self.sphinx_src = self.out_dir / "base" + # Generates the .rst files from the examples example_gallery = config.setup_script_dir / "tools" / "example_gallery" / "main.py" - assert example_gallery.is_file() - example_gallery_cmd = [sys.executable, os.fspath(example_gallery)] - if OPTION["LOG_LEVEL"] == LogLevel.QUIET: - example_gallery_cmd.append("--quiet") - qt_src_dir = OPTION['QT_SRC'] - if qt_src_dir: - example_gallery_cmd.extend(["--qt-src-dir", qt_src_dir]) - if run_process(example_gallery_cmd) != 0: - raise SetupError(f"Error running example gallery for {self.doc_dir}") + if example_gallery.is_file(): + example_gallery_args = [] + if OPTION["LOG_LEVEL"] == LogLevel.QUIET: + example_gallery_args.append("--quiet") + qt_src_dir = OPTION['QT_SRC'] + if qt_src_dir: + example_gallery_args.extend(["--qt-src-dir", qt_src_dir]) + run_script(example_gallery, example_gallery_args) + else: + log.warning("Example gallery script for generating .rst for examples" + f"not found: {example_gallery}") + + # Generates the .rst files from the release notes + release_notes = config.setup_script_dir / "tools" / "release_notes" / "main.py" + if release_notes.is_file(): + release_notes_args = [] + if OPTION["LOG_LEVEL"] != LogLevel.QUIET: + release_notes_args.append("--verbose") + run_script(release_notes, release_notes_args) + else: + log.warning("Release notes script for generating .rst for release notes" + f"not found: {release_notes}") elif self.name == SHIBOKEN: self.sphinx_src = self.out_dir |
