diff --git a/.gitignore b/.gitignore index 4612c1a..29e31a3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ __pycache__ /build /dist *.egg-info -gtk-blueprint-tool.pc +blueprint-compiler.pc /.coverage /htmlcov diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c90ad40..b73099d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,7 +7,7 @@ build: script: - dnf install -y meson python3-pip gtk4-devel gobject-introspection-devel - pip3 install furo mypy sphinx coverage - - mypy gtkblueprinttool + - mypy blueprintcompiler - coverage run -m unittest - coverage html - coverage xml diff --git a/README.md b/README.md index 779734b..3c220b1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# gtk-blueprint-tool +# Blueprint -A prototype markup language for GTK user interface files. +A markup language for GTK user interface files. ## Motivation diff --git a/gtk-blueprint-tool.pc.in b/blueprint-compiler.pc.in similarity index 76% rename from gtk-blueprint-tool.pc.in rename to blueprint-compiler.pc.in index 3e2bc4f..c000a8a 100644 --- a/gtk-blueprint-tool.pc.in +++ b/blueprint-compiler.pc.in @@ -1,3 +1,3 @@ -Name: gtk-blueprint-tool +Name: blueprint-compiler Description: Markup compiler for GTK user interface definitions Version: @VERSION@ diff --git a/gtk-blueprint-tool.py b/blueprint-compiler.py similarity index 92% rename from gtk-blueprint-tool.py rename to blueprint-compiler.py index b5bb8e7..0020bac 100755 --- a/gtk-blueprint-tool.py +++ b/blueprint-compiler.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# gtk-blueprint-tool.py +# blueprint-compiler.py # # Copyright 2021 James Westman # @@ -19,7 +19,7 @@ # # SPDX-License-Identifier: LGPL-3.0-or-later -from gtkblueprinttool import main +from blueprintcompilerpiler import main if __name__ == "__main__": main.main() diff --git a/gtkblueprinttool/__init__.py b/blueprintcompiler/__init__.py similarity index 100% rename from gtkblueprinttool/__init__.py rename to blueprintcompiler/__init__.py diff --git a/gtkblueprinttool/ast.py b/blueprintcompiler/ast.py similarity index 100% rename from gtkblueprinttool/ast.py rename to blueprintcompiler/ast.py diff --git a/gtkblueprinttool/ast_utils.py b/blueprintcompiler/ast_utils.py similarity index 100% rename from gtkblueprinttool/ast_utils.py rename to blueprintcompiler/ast_utils.py diff --git a/gtkblueprinttool/completions.py b/blueprintcompiler/completions.py similarity index 100% rename from gtkblueprinttool/completions.py rename to blueprintcompiler/completions.py diff --git a/gtkblueprinttool/completions_utils.py b/blueprintcompiler/completions_utils.py similarity index 100% rename from gtkblueprinttool/completions_utils.py rename to blueprintcompiler/completions_utils.py diff --git a/gtkblueprinttool/errors.py b/blueprintcompiler/errors.py similarity index 97% rename from gtkblueprinttool/errors.py rename to blueprintcompiler/errors.py index 41d4ce9..3a859da 100644 --- a/gtkblueprinttool/errors.py +++ b/blueprintcompiler/errors.py @@ -136,8 +136,8 @@ def report_compile_error(): print(traceback.format_exc()) print(f"Arguments: {sys.argv}\n") print(f"""{_colors.BOLD}{_colors.RED}***** COMPILER BUG ***** -The gtk-blueprint-tool program has crashed. Please report the above stacktrace, +The blueprint-compiler program has crashed. Please report the above stacktrace, along with the input file(s) if possible, on GitLab: -{_colors.BOLD}{_colors.BLUE}{_colors.UNDERLINE}https://gitlab.gnome.org/jwestman/gtk-blueprint-tool/-/issues/new?issue +{_colors.BOLD}{_colors.BLUE}{_colors.UNDERLINE}https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/new?issue {_colors.CLEAR}""") diff --git a/gtkblueprinttool/extensions/__init__.py b/blueprintcompiler/extensions/__init__.py similarity index 100% rename from gtkblueprinttool/extensions/__init__.py rename to blueprintcompiler/extensions/__init__.py diff --git a/gtkblueprinttool/extensions/gtk_a11y.py b/blueprintcompiler/extensions/gtk_a11y.py similarity index 100% rename from gtkblueprinttool/extensions/gtk_a11y.py rename to blueprintcompiler/extensions/gtk_a11y.py diff --git a/gtkblueprinttool/extensions/gtk_combo_box_text.py b/blueprintcompiler/extensions/gtk_combo_box_text.py similarity index 100% rename from gtkblueprinttool/extensions/gtk_combo_box_text.py rename to blueprintcompiler/extensions/gtk_combo_box_text.py diff --git a/gtkblueprinttool/extensions/gtk_file_filter.py b/blueprintcompiler/extensions/gtk_file_filter.py similarity index 100% rename from gtkblueprinttool/extensions/gtk_file_filter.py rename to blueprintcompiler/extensions/gtk_file_filter.py diff --git a/gtkblueprinttool/extensions/gtk_layout.py b/blueprintcompiler/extensions/gtk_layout.py similarity index 100% rename from gtkblueprinttool/extensions/gtk_layout.py rename to blueprintcompiler/extensions/gtk_layout.py diff --git a/gtkblueprinttool/extensions/gtk_menu.py b/blueprintcompiler/extensions/gtk_menu.py similarity index 100% rename from gtkblueprinttool/extensions/gtk_menu.py rename to blueprintcompiler/extensions/gtk_menu.py diff --git a/gtkblueprinttool/extensions/gtk_size_group.py b/blueprintcompiler/extensions/gtk_size_group.py similarity index 100% rename from gtkblueprinttool/extensions/gtk_size_group.py rename to blueprintcompiler/extensions/gtk_size_group.py diff --git a/gtkblueprinttool/extensions/gtk_string_list.py b/blueprintcompiler/extensions/gtk_string_list.py similarity index 100% rename from gtkblueprinttool/extensions/gtk_string_list.py rename to blueprintcompiler/extensions/gtk_string_list.py diff --git a/gtkblueprinttool/extensions/gtk_styles.py b/blueprintcompiler/extensions/gtk_styles.py similarity index 100% rename from gtkblueprinttool/extensions/gtk_styles.py rename to blueprintcompiler/extensions/gtk_styles.py diff --git a/gtkblueprinttool/gir.py b/blueprintcompiler/gir.py similarity index 100% rename from gtkblueprinttool/gir.py rename to blueprintcompiler/gir.py diff --git a/gtkblueprinttool/lsp.py b/blueprintcompiler/lsp.py similarity index 100% rename from gtkblueprinttool/lsp.py rename to blueprintcompiler/lsp.py diff --git a/gtkblueprinttool/lsp_utils.py b/blueprintcompiler/lsp_utils.py similarity index 100% rename from gtkblueprinttool/lsp_utils.py rename to blueprintcompiler/lsp_utils.py diff --git a/gtkblueprinttool/main.py b/blueprintcompiler/main.py similarity index 100% rename from gtkblueprinttool/main.py rename to blueprintcompiler/main.py diff --git a/gtkblueprinttool/parse_tree.py b/blueprintcompiler/parse_tree.py similarity index 100% rename from gtkblueprinttool/parse_tree.py rename to blueprintcompiler/parse_tree.py diff --git a/gtkblueprinttool/parser.py b/blueprintcompiler/parser.py similarity index 100% rename from gtkblueprinttool/parser.py rename to blueprintcompiler/parser.py diff --git a/gtkblueprinttool/parser_utils.py b/blueprintcompiler/parser_utils.py similarity index 100% rename from gtkblueprinttool/parser_utils.py rename to blueprintcompiler/parser_utils.py diff --git a/gtkblueprinttool/tokenizer.py b/blueprintcompiler/tokenizer.py similarity index 100% rename from gtkblueprinttool/tokenizer.py rename to blueprintcompiler/tokenizer.py diff --git a/gtkblueprinttool/utils.py b/blueprintcompiler/utils.py similarity index 100% rename from gtkblueprinttool/utils.py rename to blueprintcompiler/utils.py diff --git a/gtkblueprinttool/xml_emitter.py b/blueprintcompiler/xml_emitter.py similarity index 100% rename from gtkblueprinttool/xml_emitter.py rename to blueprintcompiler/xml_emitter.py diff --git a/gtkblueprinttool/xml_reader.py b/blueprintcompiler/xml_reader.py similarity index 100% rename from gtkblueprinttool/xml_reader.py rename to blueprintcompiler/xml_reader.py diff --git a/docs/conf.py b/docs/conf.py index 07e0b88..fc413d9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,7 +17,7 @@ # -- Project information ----------------------------------------------------- -project = 'gtk-blueprint-tool' +project = 'Blueprint' copyright = '2021, James Westman' author = 'James Westman' diff --git a/docs/index.rst b/docs/index.rst index 3f4e56e..3ba9522 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,7 +1,7 @@ Overview ======== -gtk-blueprint-tool is a markup language and compiler for GTK 4 user interfaces. +Blueprint is a markup language and compiler for GTK 4 user interfaces. .. toctree:: :maxdepth: 1 diff --git a/docs/setup.rst b/docs/setup.rst index a742133..9c827d9 100644 --- a/docs/setup.rst +++ b/docs/setup.rst @@ -2,29 +2,29 @@ Setup ===== -Use gtk-blueprint-tool in your project --------------------------------------- +Use Blueprint in your project +----------------------------- -gtk-blueprint-tool works as a meson subproject. +blueprint-compiler works as a meson subproject. -#. Save the following file as ``subprojects/gtk-blueprint-tool.wrap``: +#. Save the following file as ``subprojects/blueprint-compiler.wrap``: .. code-block:: cfg [wrap-git] - directory = gtk-blueprint-tool - url = https://gitlab.gnome.org/jwestman/gtk-blueprint-tool.git + directory = blueprint-compiler + url = https://gitlab.gnome.org/jwestman/blueprint-compiler.git revision = main depth = 1 [provide] - program_names = gtk-blueprint-tool + program_names = blueprint-compiler #. Add this to your ``.gitignore``: .. code-block:: - /subprojects/gtk-blueprint-tool + /subprojects/blueprint-compiler #. Add this to the ``meson.build`` file where you build your GResources: @@ -35,7 +35,7 @@ gtk-blueprint-tool works as a meson subproject. # LIST YOUR BLUEPRINT FILES HERE ), output: '.', - command: [find_program('gtk-blueprint-tool'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'], + command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'], ) #. In the same ``meson.build`` file, add this argument to your ``gnome.compile_resources`` command: diff --git a/meson.build b/meson.build index 843f301..ded56d9 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('gtk-blueprint-tool', +project('blueprint-compiler', version: '0.1.0', ) @@ -10,23 +10,23 @@ libdir = join_paths(prefix, get_option('libdir')) py = import('python').find_installation('python3') configure_file( - input: 'gtk-blueprint-tool.pc.in', - output: 'gtk-blueprint-tool.pc', + input: 'blueprint-compiler.pc.in', + output: 'blueprint-compiler.pc', configuration: { 'VERSION': meson.project_version() }, install: not meson.is_subproject(), install_dir: join_paths(libdir, 'pkgconfig'), ) install_data( - 'gtk-blueprint-tool.py', + 'blueprint-compiler.py', install_dir: get_option('bindir'), - rename: 'gtk-blueprint-tool', + rename: 'blueprint-compiler', ) -meson.override_find_program('gtk-blueprint-tool', find_program('gtk-blueprint-tool.py')) +meson.override_find_program('blueprint-compiler', find_program('blueprint-compiler.py')) if not meson.is_subproject() - install_subdir('gtkblueprinttool', install_dir: py.get_install_dir()) + install_subdir('blueprintcompiler', install_dir: py.get_install_dir()) endif subdir('tests') diff --git a/tests/test_samples.py b/tests/test_samples.py index 0bb20e6..6ceee2b 100644 --- a/tests/test_samples.py +++ b/tests/test_samples.py @@ -23,10 +23,10 @@ from pathlib import Path import traceback import unittest -from gtkblueprinttool import tokenizer, parser -from gtkblueprinttool.errors import PrintableError, MultipleErrors, CompileError -from gtkblueprinttool.tokenizer import Token, TokenType, tokenize -from gtkblueprinttool import utils +from blueprintcompiler import tokenizer, parser +from blueprintcompiler.errors import PrintableError, MultipleErrors, CompileError +from blueprintcompiler.tokenizer import Token, TokenType, tokenize +from blueprintcompiler import utils class TestSamples(unittest.TestCase): diff --git a/tests/test_tokenizer.py b/tests/test_tokenizer.py index c9e697d..67f9994 100644 --- a/tests/test_tokenizer.py +++ b/tests/test_tokenizer.py @@ -20,8 +20,8 @@ import unittest -from gtkblueprinttool.errors import PrintableError -from gtkblueprinttool.tokenizer import Token, TokenType, tokenize +from blueprintcompiler.errors import PrintableError +from blueprintcompiler.tokenizer import Token, TokenType, tokenize class TestTokenizer(unittest.TestCase):