diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-12-07 10:21:08 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-12-07 12:02:34 +0100 |
commit | 30e4777956513daeba0f55cef50de4881d0bb2f1 (patch) | |
tree | 1567dde2f711d52183d7eea965bca8a9bbdad13b /tools/snippets_translate | |
parent | fe1b1026d02722a4b7b4b0e0e2811f2a799c38c9 (diff) |
Documentation: Remove the snippets copy step
This is no longer necessary since the snippets have been removed from
the repository. Generate them directly into the build directory.
Pick-to: 6.2
Task-number: PYSIDE-1721
Change-Id: I0a4d9bc3c466b689fa28a982f608104cc5936570
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'tools/snippets_translate')
-rw-r--r-- | tools/snippets_translate/main.py | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/tools/snippets_translate/main.py b/tools/snippets_translate/main.py index d279392d4..a0a4663a0 100644 --- a/tools/snippets_translate/main.py +++ b/tools/snippets_translate/main.py @@ -73,7 +73,6 @@ log = logging.getLogger("snippets_translate") # Filter and paths configuration SKIP_END = (".pro", ".pri", ".cmake", ".qdoc", ".yaml", ".frag", ".qsb", ".vert", "CMakeLists.txt") SKIP_BEGIN = ("changes-", ".") -OUT_MAIN = Path("sources/pyside6/doc/codesnippets/") SNIPPET_PATTERN = re.compile(r"//! \[([^]]+)\]") @@ -94,11 +93,11 @@ def get_parser(): ) parser.add_argument( - "--pyside", + "--target", action="store", - dest="pyside_dir", + dest="target_dir", required=True, - help="Path to the pyside-setup directory", + help="Directory into which to generate the snippets", ) parser.add_argument( @@ -155,7 +154,7 @@ def check_arguments(options): if options.write_files: if not opt_quiet: log.warning( - f"Files will be copied from '{options.qt_dir}':\n" f"\tto '{options.pyside_dir}'" + f"Files will be copied from '{options.qt_dir}':\n" f"\tto '{options.target_dir}'" ) else: msg = "This is a listing only, files are not being copied" @@ -164,11 +163,8 @@ def check_arguments(options): if not opt_quiet: log.info(msg, extra=extra) - # Check 'qt_dir' and 'pyside_dir' - if is_directory(options.qt_dir) and is_directory(options.pyside_dir): - return True - - return False + # Check 'qt_dir' + return is_directory(options.qt_dir) def is_valid_file(x): @@ -341,8 +337,7 @@ def copy_file(file_path, qt_path, out_path, write=False, debug=False): def process(options): qt_path = Path(options.qt_dir) - py_path = Path(options.pyside_dir) - out_path = py_path / OUT_MAIN + out_path = Path(options.target_dir) # (new, exists) valid_new, valid_exists = 0, 0 |