From 9fa60990903d6f905e4648e5e8dcd02d07f722ac Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 16:58:29 +0100 Subject: [PATCH] update to 3.7.10 added posttransfiletrigger's to cleanup empty *.egg-info directories [release 3.7.10-1mamba;Tue Mar 09 2021] --- python3.spec | 55 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/python3.spec b/python3.spec index 3685429..dd8196b 100644 --- a/python3.spec +++ b/python3.spec @@ -3,7 +3,7 @@ %define libname libpython3 %define __libdir %{_libdir} Name: python3 -Version: 3.7.9 +Version: 3.7.10 Release: 1mamba Summary: An interpreted, interactive, object-oriented programming language Group: Applications/Development @@ -50,12 +50,12 @@ BuildRequires: libtk >= 8.4.11 %endif BuildRequires: python-pip-py3 BuildRequires: python-setuptools-py3 -Requires: %{libname} = %{version}-%{release} +Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release} Provides: python-abi = %{majversion} Provides: python(abi) = %{majversion} Provides: /usr/bin/python Provides: /usr/bin/python3 -BuildRoot: %{_tmppath}/%{name}-%{version}-root +Obsoletes: python3-doc < 3.7.10 %description Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. @@ -80,9 +80,9 @@ This package contains the libraries for Python. %package -n %{libname}-devel Group: Development/Libraries/Python Summary: Devel package for Python -Requires: %{libname} = %{version}-%{release} -Provides: %{name}-devel = %{version}-%{release} -Obsoletes: %{name}-devel +Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release} +Provides: %{name}-devel = %{?epoch:%epoch:}%{version}-%{release} +Obsoletes: %{name}-devel < 3.7.10 %description -n %{libname}-devel Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. @@ -96,7 +96,7 @@ This package contains the development files for Python. %package doc Group: Documentation Summary: Documentation package for Python -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description doc Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. @@ -110,7 +110,7 @@ This package contains the documentation files for Python in HTML format. %package tk Group: System/Libraries/Python Summary: Tk library for Python -Requires: %{name} = %{version}-%{release} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description tk Python is an interpreted, interactive, object-oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. @@ -165,12 +165,13 @@ chmod 755 %{buildroot}%{__libdir}/libpython%{majversion}m.so.* cd Doc ###sed -i s@/usr/bin/env@/bin/env@ tools/mkhowto -PATH=$PATH:%{_builddir}/Python-%{version}/Doc/tools -make html - -install -d %{buildroot}%{_defaultdocdir}/%{name}-%{version} -cp -R build/html build/doctrees %{buildroot}%{_defaultdocdir}/%{name}-%{version} -rm -f `find %{buildroot}%{_defaultdocdir}/%{name}-%{version}/html/.cvsignore` +# NOTE: html docs don't build with recent Sphinx (3.5.2) +#PATH=$PATH:%{_builddir}/Python-%{version}/Doc/tools +#make html +# +#install -d %{buildroot}%{_defaultdocdir}/%{name}-%{version} +#cp -R build/html build/doctrees %{buildroot}%{_defaultdocdir}/%{name}-%{version} +#rm -f `find %{buildroot}%{_defaultdocdir}/%{name}-%{version}/html/.cvsignore` #make PAPER=a4 pdf %endif @@ -213,6 +214,16 @@ fi %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig +%transfiletriggerpostun -P 2000000 -- %{__libdir}/python%{majversion}/site-packages +find %{__libdir}/python%{majversion}/site-packages/*.egg-info -type d -empty -exec rmdir {} \; +: + +%ifarch x86_64 aarch64 +%transfiletriggerpostun -P 2000000 -- %{_prefix}/lib/python%{majversion}/site-packages +find %{__libdir}/python%{majversion}/site-packages/*.egg-info -type d -empty -exec rmdir {} \; +: +%endif + %files %defattr(-,root,root) %{_bindir}/2to3-%{majversion} @@ -262,15 +273,19 @@ fi %defattr(-,root,root) %{__libdir}/python%{majversion}/lib-dynload/_tkinter*.so -%files doc -%defattr(-,root,root) -%dir %{_defaultdocdir}/%{name}-%{version}/html/ -%{_defaultdocdir}/%{name}-%{version}/html/* -%dir %{_defaultdocdir}/%{name}-%{version}/doctrees -%{_defaultdocdir}/%{name}-%{version}/doctrees/* +#%files doc +#%defattr(-,root,root) +#%dir %{_defaultdocdir}/%{name}-%{version}/html/ +#%{_defaultdocdir}/%{name}-%{version}/html/* +#%dir %{_defaultdocdir}/%{name}-%{version}/doctrees +#%{_defaultdocdir}/%{name}-%{version}/doctrees/* %endif %changelog +* Tue Mar 09 2021 Silvan Calarco 3.7.10-1mamba +- update to 3.7.10 +- added posttransfiletrigger's to cleanup empty *.egg-info directories + * Fri Jan 01 2021 Silvan Calarco 3.7.9-1mamba - update to 3.7.9 - install macros.pyver with custom pyver macros updated and to be moved from macros.python