From f5486c0bf45f9ac7c7cd7df15bf7c8c8052cac3d Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 11:06:45 +0100 Subject: [PATCH] rebuild with python-build and resolve bindir conflicts [release 0.21.7-2mamba;Wed Dec 13 2023] --- python-dulwich.spec | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/python-dulwich.spec b/python-dulwich.spec index e140c4b..494e6e9 100644 --- a/python-dulwich.spec +++ b/python-dulwich.spec @@ -1,6 +1,7 @@ +%define pkgname %(echo %name | cut -d- -f2- | tr - _) Name: python-dulwich Version: 0.21.7 -Release: 1mamba +Release: 2mamba Summary: Python implementation of Git Group: System/Libraries Vendor: openmamba @@ -12,7 +13,6 @@ License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libpython311-devel -BuildRequires: python3.11dist(setuptools) BuildRequires: python3.11dist(urllib3) ## AUTOBUILDREQ-END BuildRequires: python3-devel >= 3.11.5-3mamba @@ -28,26 +28,36 @@ BuildRequires: python3-devel >= 3.11.5-3mamba %setup -q -n dulwich-%{version} %build -CFLAGS="%{optflags}" %{__python} setup.py build +CFLAGS="%{optflags}" %{__python} -m build --no-isolation --wheel %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -%{__python} setup.py install \ - -O1 --skip-build \ - --root="%{buildroot}" \ - --install-headers=%{_includedir}/python \ - --install-lib=%{python_sitearch} \ - --record=%{name}.filelist +%{__python} -m installer --destdir=%{buildroot} dist/*.whl -sed -i "\,\.egg-info/,d;s,.*/man/.*,&.gz," %{name}.filelist +%if "%{?with_pyver}" != "3" +# Rename any conflicting file outside of python site packages tree +for f in %{_bindir}/{dulwich,dul-receive-pack,dul-upload-pack}; do + mv %{buildroot}${f}{,-%{?pyappend}} +done +%endif -%files %{?pyappend} -f %{name}.filelist +rm -rf %{buildroot}%{python_sitearch}/docs/ + +%files %{?pyappend} %defattr(-,root,root) -%dir %{python_sitearch}/dulwich-%{version}-py*.egg-info -%{python_sitearch}/dulwich-%{version}-py*.egg-info/* +%{_bindir}/dulwich* +%{_bindir}/dul-receive-pack* +%{_bindir}/dul-upload-pack* +%dir %{python_sitearch}/%{pkgname}-%{version}.dist-info +%{python_sitearch}/%{pkgname}-%{version}.dist-info/* +%dir %{python_sitearch}/%{pkgname} +%{python_sitearch}/%{pkgname}/* %doc COPYING NEWS %changelog +* Wed Dec 13 2023 Silvan Calarco 0.21.7-2mamba +- rebuild with python-build and resolve bindir conflicts + * Wed Dec 06 2023 Automatic Build System 0.21.7-1mamba - automatic version update by autodist