Rename to blueprint-compiler

This isn't an official GTK project so better to avoid using "GTK" in the
name.
This commit is contained in:
James Westman 2021-12-01 15:35:58 -06:00
parent be3c0de670
commit 544d152fb6
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
37 changed files with 33 additions and 33 deletions

2
.gitignore vendored
View file

@ -2,7 +2,7 @@ __pycache__
/build /build
/dist /dist
*.egg-info *.egg-info
gtk-blueprint-tool.pc blueprint-compiler.pc
/.coverage /.coverage
/htmlcov /htmlcov

View file

@ -7,7 +7,7 @@ build:
script: script:
- dnf install -y meson python3-pip gtk4-devel gobject-introspection-devel - dnf install -y meson python3-pip gtk4-devel gobject-introspection-devel
- pip3 install furo mypy sphinx coverage - pip3 install furo mypy sphinx coverage
- mypy gtkblueprinttool - mypy blueprintcompiler
- coverage run -m unittest - coverage run -m unittest
- coverage html - coverage html
- coverage xml - coverage xml

View file

@ -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 ## Motivation

View file

@ -1,3 +1,3 @@
Name: gtk-blueprint-tool Name: blueprint-compiler
Description: Markup compiler for GTK user interface definitions Description: Markup compiler for GTK user interface definitions
Version: @VERSION@ Version: @VERSION@

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# gtk-blueprint-tool.py # blueprint-compiler.py
# #
# Copyright 2021 James Westman <james@jwestman.net> # Copyright 2021 James Westman <james@jwestman.net>
# #
@ -19,7 +19,7 @@
# #
# SPDX-License-Identifier: LGPL-3.0-or-later # SPDX-License-Identifier: LGPL-3.0-or-later
from gtkblueprinttool import main from blueprintcompilerpiler import main
if __name__ == "__main__": if __name__ == "__main__":
main.main() main.main()

View file

@ -136,8 +136,8 @@ def report_compile_error():
print(traceback.format_exc()) print(traceback.format_exc())
print(f"Arguments: {sys.argv}\n") print(f"Arguments: {sys.argv}\n")
print(f"""{_colors.BOLD}{_colors.RED}***** COMPILER BUG ***** 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: 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}""") {_colors.CLEAR}""")

View file

@ -17,7 +17,7 @@
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = 'gtk-blueprint-tool' project = 'Blueprint'
copyright = '2021, James Westman' copyright = '2021, James Westman'
author = 'James Westman' author = 'James Westman'

View file

@ -1,7 +1,7 @@
Overview 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:: .. toctree::
:maxdepth: 1 :maxdepth: 1

View file

@ -2,29 +2,29 @@
Setup 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 .. code-block:: cfg
[wrap-git] [wrap-git]
directory = gtk-blueprint-tool directory = blueprint-compiler
url = https://gitlab.gnome.org/jwestman/gtk-blueprint-tool.git url = https://gitlab.gnome.org/jwestman/blueprint-compiler.git
revision = main revision = main
depth = 1 depth = 1
[provide] [provide]
program_names = gtk-blueprint-tool program_names = blueprint-compiler
#. Add this to your ``.gitignore``: #. Add this to your ``.gitignore``:
.. code-block:: .. code-block::
/subprojects/gtk-blueprint-tool /subprojects/blueprint-compiler
#. Add this to the ``meson.build`` file where you build your GResources: #. 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 # LIST YOUR BLUEPRINT FILES HERE
), ),
output: '.', 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: #. In the same ``meson.build`` file, add this argument to your ``gnome.compile_resources`` command:

View file

@ -1,4 +1,4 @@
project('gtk-blueprint-tool', project('blueprint-compiler',
version: '0.1.0', version: '0.1.0',
) )
@ -10,23 +10,23 @@ libdir = join_paths(prefix, get_option('libdir'))
py = import('python').find_installation('python3') py = import('python').find_installation('python3')
configure_file( configure_file(
input: 'gtk-blueprint-tool.pc.in', input: 'blueprint-compiler.pc.in',
output: 'gtk-blueprint-tool.pc', output: 'blueprint-compiler.pc',
configuration: { 'VERSION': meson.project_version() }, configuration: { 'VERSION': meson.project_version() },
install: not meson.is_subproject(), install: not meson.is_subproject(),
install_dir: join_paths(libdir, 'pkgconfig'), install_dir: join_paths(libdir, 'pkgconfig'),
) )
install_data( install_data(
'gtk-blueprint-tool.py', 'blueprint-compiler.py',
install_dir: get_option('bindir'), 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() if not meson.is_subproject()
install_subdir('gtkblueprinttool', install_dir: py.get_install_dir()) install_subdir('blueprintcompiler', install_dir: py.get_install_dir())
endif endif
subdir('tests') subdir('tests')

View file

@ -23,10 +23,10 @@ from pathlib import Path
import traceback import traceback
import unittest import unittest
from gtkblueprinttool import tokenizer, parser from blueprintcompiler import tokenizer, parser
from gtkblueprinttool.errors import PrintableError, MultipleErrors, CompileError from blueprintcompiler.errors import PrintableError, MultipleErrors, CompileError
from gtkblueprinttool.tokenizer import Token, TokenType, tokenize from blueprintcompiler.tokenizer import Token, TokenType, tokenize
from gtkblueprinttool import utils from blueprintcompiler import utils
class TestSamples(unittest.TestCase): class TestSamples(unittest.TestCase):

View file

@ -20,8 +20,8 @@
import unittest import unittest
from gtkblueprinttool.errors import PrintableError from blueprintcompiler.errors import PrintableError
from gtkblueprinttool.tokenizer import Token, TokenType, tokenize from blueprintcompiler.tokenizer import Token, TokenType, tokenize
class TestTokenizer(unittest.TestCase): class TestTokenizer(unittest.TestCase):