rebuild with python-build and resolve bindir conflicts [release 0.21.7-2mamba;Wed Dec 13 2023]

This commit is contained in:
Silvan Calarco 2024-01-06 11:06:45 +01:00
parent 578b6c03ec
commit f5486c0bf4

View File

@ -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 <silvan.calarco@mambasoft.it> 0.21.7-2mamba
- rebuild with python-build and resolve bindir conflicts
* Wed Dec 06 2023 Automatic Build System <autodist@mambasoft.it> 0.21.7-1mamba
- automatic version update by autodist