%define pypi_name kaitaistruct %define python_name python3-%{pypi_name} Name: python-%{pypi_name} Version: 0.10 Release: %autorelease # Fill in the actual package summary to submit package to Fedora Summary: Kaitai Struct declarative parser generator for binary data: runtime library for Python # Check if the automatically generated License and its spelling is correct for Fedora # https://docs.fedoraproject.org/en-US/packaging-guidelines/LicensingGuidelines/ License: MIT URL: https://kaitai.io Source: https://files.pythonhosted.org/packages/source/k/kaitaistruct/kaitaistruct-%{version}.tar.gz BuildRequires: pyproject-rpm-macros BuildRequires: python3-devel BuildRequires: fdupes BuildArch: noarch # Fill in the actual package description to submit package to Fedora %global _description %{expand: # Kaitai Struct: runtime library for Python [![PyPI](https://img.shields.io/pypi/v/kaitaistruct)](https://pypi.org/project/kaitaistruct/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/kaitaistruct)](https://pypi.org/project/kaitaistruct/#:~:text=Programming%20Language) This library implements Kaitai Struct API for Python. [Kaitai Struct](https://kaitai.io/) is a declarative language used for describe various binary data structures, laid out in files or in memory: i.e. binary file formats, network stream packet formats, etc. It is similar to [Python's Construct 2.10](https://construct.readthedocs.io/en/latest/) but it is language-agnostic. The format description is done in YAML-based .ksy format, which then can be compiled into a wide range of target languages. Further reading: * [About Kaitai Struct](https://kaitai.io/) * [About API implemented in this library](https://doc.kaitai.io/stream_api.html) * [Python-specific notes](https://doc.kaitai.io/lang_python.html) in KS documentation discuss installation and usage of this runtime } %description %_description %package -n %{python_name} Summary: %{summary} %description -n %{python_name} %_description %prep %autosetup -p1 -n kaitaistruct-%{version} %generate_buildrequires # Keep only those extras which you actually want to package or use during tests %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install # For official Fedora packages, including files with '*' +auto is not allowed # Replace it with a list of relevant Python modules/globs and list extra files in %%files %pyproject_save_files '*' +auto %files -n %{python_name} -f %{pyproject_files} %changelog %autochangelog