diff --git a/README.md b/README.md index 0e751b1..0c3990c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # python-protobuf +Python bindings for protobuf. + diff --git a/python-protobuf.spec b/python-protobuf.spec new file mode 100644 index 0000000..81ef0f3 --- /dev/null +++ b/python-protobuf.spec @@ -0,0 +1,62 @@ +%define pkgname %(echo %name | cut -d- -f2- | tr - _) +Name: python-protobuf +Epoch: 1 +Version: 5.26.1 +Release: 1mamba +Summary: Python bindings for protobuf +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://developers.google.com/protocol-buffers/ +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 +* Sat Apr 06 2024 Silvan Calarco 5.26.1-1mamba +- package created using the webbuild interface