## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 11; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global pypi_name pure-protobuf Name: python-%{pypi_name} Version: 2.0.1 Release: %autorelease Summary: Python implementation of Protocol Buffers data types with dataclasses support License: MIT URL: https://github.com/eigenein/protobuf # Using github sources since tests not available on PyPI Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(pytest) BuildRequires: python3dist(setuptools) %if 0%{?el8} BuildRequires: python3dist(dataclasses) %endif %global _description %{expand: pure-protobuf allows you to take advantages of the standard dataclasses module to define message types. It is preferred over the legacy interface for new projects. The dataclasses interface is available in Python 3.6 and higher. The legacy interface is deprecated and still available via pure_protobuf.legacy. This guide describes how to use pure-protobuf to structure your data. It tries to follow the standard developer guide. It also assumes that you're familiar with Protocol Buffers.} %description %{_description} %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} %{_description} %prep %autosetup -n protobuf-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info # Fix shebangs pushd pure_protobuf sed -i 's|/usr/bin/env python3|%{_bindir}/python3|' \ __init__.py dataclasses_.py popd %build %py3_build %install %py3_install # E: non-executable-script pushd %{buildroot}%{python3_sitelib}/pure_protobuf/ chmod +x __init__.py dataclasses_.py popd %check %{python3} -m pytest -v %files -n python3-%{pypi_name} %license LICENSE %doc README.md %{python3_sitelib}/pure_protobuf-%{version}-py*.egg-info %{python3_sitelib}/pure_protobuf/ %changelog * Fri Mar 03 2023 Gwyn Ciesla 2.0.1-11 - fix typo * Fri Mar 03 2023 Gwyn Ciesla 2.0.1-10 - migrated to SPDX license * Fri Jan 20 2023 Fedora Release Engineering 2.0.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Tue Jan 10 2023 Diego Herrera - 2.0.1-7 - Filter unneeded dependency for EPEL9 * Fri Jul 22 2022 Fedora Release Engineering - 2.0.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 2.0.1-5 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 2.0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 2.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 2.0.1-2 - Rebuilt for Python 3.10 * Sun Jan 31 2021 Lyes Saadi - 2.0.1-1 - Updating to 2.0.1 - Preparing for EPEL8 builds * Wed Jan 27 2021 Fedora Release Engineering - 2.0.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 2.0.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Fri May 29 2020 Lyes Saadi - 2.0.0-3 - Removing useless dependencies (coverage/linting) * Tue May 26 2020 Miro HronĨok - 2.0.0-2 - Rebuilt for Python 3.9 * Fri Feb 21 2020 Artem Polishchuk - 2.0.0-1 - Initial package