%define srcname nunavut %define version 2.0.10 %define release 1 Summary: Generate code from DSDL using Jinja2 templates. Name: %{srcname} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz License: MIT Group: Development/Libraries BuildArch: noarch Vendor: OpenCyphal Development Team Url: https://opencyphal.org BuildRequires: python3-devel python3-setuptools %description Nunavut is a source-to-source compiler (transpiler) that automatically converts `OpenCyphal`_ DSDL definitions into source code in a specified target programming language. It is constructed as a template engine that exposes a `PyDSDL`_ abstract syntax tree to `Jinja2`_ templates allowing authors to generate code, schemas, metadata, documentation, etc. Nunavut ships with built-in support for some programming languages, and it can be used to generate code for other languages if custom templates (and some glue logic) are provided. Currently, the following languages are supported out of the box: - **C11** (generates header-only libraries) - **HTML** (generates documentation pages) (experimental support) The following languages are currently on the roadmap: - **Python** (already supported in `Pycyphal`_, pending `transplantation into Nunavut `_) - **C++ 14 and newer** (generates header-only libraries; `work-in-progress `_) Nunavut is named after the `Canadian territory`_. We chose the name because it is a beautiful word to say and read. ************************************************ Bundled third-party software ************************************************ Nunavut embeds the following third-party software libraries into its source (i.e. these are not dependencies and do not need to be installed): - `Jinja2`_ by Armin Ronacher and contributors, BSD 3-clause license. - `markupsafe`_ by Armin Ronacher and contributors, BSD 3-clause license (needed for Jinja). ************************************************ Documentation ************************************************ The documentation for Nunavut is hosted on readthedocs.io: - `nunavut`_ - The python library provided by this project. - `nnvg`_ – Command-line script for using `nunavut`_ directly or as part of a build system. - `nunavut template guide`_ – Documentation for authors of nunavut templates. - `nunavut contributors guide`_ – Documentation for contributors to the Nunavut project. - `nunavut licenses`_ – Licenses and copyrights Nunavut is part of the OpenCyphal project: - `OpenCyphal website`_ - `OpenCyphal forum`_ .. _`OpenCyphal`: http://opencyphal.org .. _`OpenCyphal website`: http://opencyphal.org .. _`OpenCyphal forum`: https://forum.opencyphal.org .. _`nunavut`: https://nunavut.readthedocs.io/en/latest/docs/api/modules.html .. _`nnvg`: https://nunavut.readthedocs.io/en/latest/docs/cli.html .. _`PyDSDL`: https://github.com/OpenCyphal/pydsdl .. _`Pycyphal`: https://github.com/OpenCyphal/pycyphal .. _`nunavut template guide`: https://nunavut.readthedocs.io/en/latest/docs/templates.html .. _`nunavut contributors guide`: https://nunavut.readthedocs.io/en/latest/docs/dev.html .. _`nunavut licenses`: https://nunavut.readthedocs.io/en/latest/docs/appendix.html#licence .. _`Jinja2`: https://palletsprojects.com/p/jinja .. _`markupsafe`: https://palletsprojects.com/p/markupsafe .. _`Canadian territory`: https://en.wikipedia.org/wiki/Nunavut %package -n python3-nunavut Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel python%{python3_pkgversion}-setuptools python3-pydsdl python%{python3_pkgversion}-importlib-resources %description -n python3-%{srcname} %{description} %prep %autosetup -n %{srcname}-%{version} %build %py3_build %install %py3_install %files -n python3-nunavut %doc README.rst docs/* %{_bindir}/nnvg %{python3_sitelib}/%{srcname}/ %{python3_sitelib}/%{srcname}-%{version}*