%global _empty_manifest_terminate_build 0 Name: python-pydsdl Version: 1.20.0 Release: 1 Summary: Cyphal DSDL processing frontend License: MIT URL: https://opencyphal.org Source0: https://mirrors.nju.edu.cn/pypi/web/packages/0a/9e/16ed1f36e8c086c9963e579b26691d20dce230856f9abe756f35a79d9392/pydsdl-1.20.0.tar.gz BuildArch: noarch %description # PyDSDL [![Build status](https://ci.appveyor.com/api/projects/status/lurx5gihhcl9wq1w/branch/master?svg=true)](https://ci.appveyor.com/project/Zubax/pydsdl/branch/master) [![Documentation Status](https://readthedocs.org/projects/pydsdl/badge/?version=latest)](https://pydsdl.readthedocs.io/en/latest/?badge=latest) [![PyPI - Downloads](https://img.shields.io/pypi/dm/pydsdl)](https://pypi.org/project/pydsdl/) [![Forum](https://img.shields.io/discourse/https/forum.opencyphal.org/users.svg)](https://forum.opencyphal.org) PyDSDL is a [Cyphal](https://opencyphal.org) DSDL compiler front-end implemented in Python. It accepts a DSDL namespace at the input and produces a well-annotated abstract syntax tree (AST) at the output, evaluating all constant expressions in the process. All DSDL features defined in the Cyphal Specification are supported. The library should, in theory, work on any platform and with any Python implementation. **Read the docs at [pydsdl.readthedocs.io](https://pydsdl.readthedocs.io/).** ```python import pydsdl try: types = pydsdl.read_namespace(target_directory, lookup_directories) except pydsdl.InvalidDefinitionError as ex: print(f'{ex.path}:{ex.line}: Invalid DSDL: {ex.text}', file=sys.stderr) exit(1) else: for t in types: print(t) # Process the type -- generate code, analyze, etc. ``` %package -n python3-pydsdl Summary: Cyphal DSDL processing frontend Provides: python-pydsdl BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-pydsdl # PyDSDL [![Build status](https://ci.appveyor.com/api/projects/status/lurx5gihhcl9wq1w/branch/master?svg=true)](https://ci.appveyor.com/project/Zubax/pydsdl/branch/master) [![Documentation Status](https://readthedocs.org/projects/pydsdl/badge/?version=latest)](https://pydsdl.readthedocs.io/en/latest/?badge=latest) [![PyPI - Downloads](https://img.shields.io/pypi/dm/pydsdl)](https://pypi.org/project/pydsdl/) [![Forum](https://img.shields.io/discourse/https/forum.opencyphal.org/users.svg)](https://forum.opencyphal.org) PyDSDL is a [Cyphal](https://opencyphal.org) DSDL compiler front-end implemented in Python. It accepts a DSDL namespace at the input and produces a well-annotated abstract syntax tree (AST) at the output, evaluating all constant expressions in the process. All DSDL features defined in the Cyphal Specification are supported. The library should, in theory, work on any platform and with any Python implementation. **Read the docs at [pydsdl.readthedocs.io](https://pydsdl.readthedocs.io/).** ```python import pydsdl try: types = pydsdl.read_namespace(target_directory, lookup_directories) except pydsdl.InvalidDefinitionError as ex: print(f'{ex.path}:{ex.line}: Invalid DSDL: {ex.text}', file=sys.stderr) exit(1) else: for t in types: print(t) # Process the type -- generate code, analyze, etc. ``` %package help Summary: Development documents and examples for pydsdl Provides: python3-pydsdl-doc %description help # PyDSDL [![Build status](https://ci.appveyor.com/api/projects/status/lurx5gihhcl9wq1w/branch/master?svg=true)](https://ci.appveyor.com/project/Zubax/pydsdl/branch/master) [![Documentation Status](https://readthedocs.org/projects/pydsdl/badge/?version=latest)](https://pydsdl.readthedocs.io/en/latest/?badge=latest) [![PyPI - Downloads](https://img.shields.io/pypi/dm/pydsdl)](https://pypi.org/project/pydsdl/) [![Forum](https://img.shields.io/discourse/https/forum.opencyphal.org/users.svg)](https://forum.opencyphal.org) PyDSDL is a [Cyphal](https://opencyphal.org) DSDL compiler front-end implemented in Python. It accepts a DSDL namespace at the input and produces a well-annotated abstract syntax tree (AST) at the output, evaluating all constant expressions in the process. All DSDL features defined in the Cyphal Specification are supported. The library should, in theory, work on any platform and with any Python implementation. **Read the docs at [pydsdl.readthedocs.io](https://pydsdl.readthedocs.io/).** ```python import pydsdl try: types = pydsdl.read_namespace(target_directory, lookup_directories) except pydsdl.InvalidDefinitionError as ex: print(f'{ex.path}:{ex.line}: Invalid DSDL: {ex.text}', file=sys.stderr) exit(1) else: for t in types: print(t) # Process the type -- generate code, analyze, etc. ``` %prep %autosetup -n pydsdl-1.20.0 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-pydsdl -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri May 05 2023 Python_Bot - 1.20.0-1 - Package Spec generated