python-protobuf/python-protobuf.spec

69 lines
2.0 KiB
RPMSpec

%define pkgname %(echo %name | cut -d- -f2- | tr - _)
Name: python-protobuf
Epoch: 1
Version: 5.27.1
Release: 1mamba
Summary: Python bindings for protobuf
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://protobuf.dev/
Source: https://pypi.debian.net/protobuf/protobuf-%{version}.tar.gz
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libpython311-devel
## AUTOBUILDREQ-END
%description
%{summary}.
%if 0%{?with_pyver}
%if "0%{?with_pyver}" == "03"
%define py_requires_append \
Provides: python-protobuf \
Obsoletes: python-protobuf <= 21.12-1mamba \
Obsoletes: python-protobuf26 <= 3.15.8-2mamba \
Obsoletes: python-protobuf-py310 < 25.3
%endif
%pyver_package
%endif
%prep
%setup -q -n protobuf-%{version}
%build
CFLAGS="%{optflags}" %{__python} -m build --no-isolation --wheel
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%{__python} -m installer --destdir=%{buildroot} dist/*.whl
#%if "%{?with_pyver}" != "3"
## Rename any conflicting file outside of python site packages tree
#for f in %{_bindir}/pdm; do
# mv %{buildroot}${f}{,-%{?pyappend}}
#done
#%endif
%files %{?pyappend}
%defattr(-,root,root)
%dir %{python_sitearch}/%{pkgname}-%{version}.dist-info
%{python_sitearch}/%{pkgname}-%{version}.dist-info/*
%dir %{python_sitearch}/google/%{pkgname}
%{python_sitearch}/google/%{pkgname}/*
%{python3_sitearch}/google/_upb/_message.cpython-*.so
%{python3_sitearch}/protobuf-%{version}-py*-nspkg.pth
%doc LICENSE
%changelog
* Fri Jun 07 2024 Automatic Build System <autodist@openmamba.org> 5.27.1-1mamba
- automatic version update by autodist
* Fri May 24 2024 Automatic Build System <autodist@openmamba.org> 5.27.0-1mamba
- automatic version update by autodist
* Sat Apr 06 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 5.26.1-1mamba
- package created using the webbuild interface