macros.python3: use sysconfig instead of distutils [release 3.7.12-2mamba;Wed Feb 02 2022]

This commit is contained in:
Silvan Calarco 2024-01-05 16:58:30 +01:00
parent 4788524181
commit 713323647b
2 changed files with 13 additions and 12 deletions

View File

@ -10,10 +10,10 @@
%__python3_requires %{_usrlibrpm}/pythondeps3.sh --requires %__python3_requires %{_usrlibrpm}/pythondeps3.sh --requires
# Useful macros for building *.rpm python packages (for python > 1.6). # Useful macros for building *.rpm python packages (for python > 1.6).
#
%python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(True));") %python3_sitearch %(%{__python3} -c "from sysconfig import get_paths; print(get_paths()['platlib'])")
%python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %python3_sitelib %(%{__python3} -c "from sysconfig import get_paths; print(get_paths()['purelib'])")
%python3_inc %(%{__python3} -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") %python3_inc %(%{__python3} -c "from sysconfig import get_paths; print(get_paths()['include'])")
%python3_version %(%{__python3} -c "import sys; print(sys.version[0:3])") %python3_version %(%{__python3} -c "import sys; print(sys.version[0:3])")
%py3_compile(O) \ %py3_compile(O) \

View File

@ -2,7 +2,7 @@
%define libname libpython3 %define libname libpython3
Name: python3 Name: python3
Version: 3.7.12 Version: 3.7.12
Release: 1mamba Release: 2mamba
Summary: An interpreted, interactive, object-oriented programming language Summary: An interpreted, interactive, object-oriented programming language
Group: Applications/Development Group: Applications/Development
Vendor: openmamba Vendor: openmamba
@ -10,7 +10,7 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.python.org/ URL: https://www.python.org/
Source: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz Source: https://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
Source1: python-3.2-macros.python Source1: macros.python3
Source2: pythondeps3.sh Source2: pythondeps3.sh
Source3: python-rpm-macros.pyver Source3: python-rpm-macros.pyver
Patch0: python-2.4.2-tex3-fix.patch Patch0: python-2.4.2-tex3-fix.patch
@ -86,7 +86,6 @@ Python combines remarkable power with very clear syntax. It has modules, classes
There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++.
Python is also usable as an extension language for applications that need a programmable interface. Python is also usable as an extension language for applications that need a programmable interface.
The Python implementation is portable: it runs on many brands of UNIX, on Windows, DOS, OS/2, Mac, Amiga... The Python implementation is portable: it runs on many brands of UNIX, on Windows, DOS, OS/2, Mac, Amiga...
This package contains the development files for Python. This package contains the development files for Python.
%package doc %package doc
@ -100,7 +99,6 @@ Python combines remarkable power with very clear syntax. It has modules, classes
There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++. There are interfaces to many system calls and libraries, as well as to various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules are easily written in C or C++.
Python is also usable as an extension language for applications that need a programmable interface. Python is also usable as an extension language for applications that need a programmable interface.
The Python implementation is portable: it runs on many brands of UNIX, on Windows, DOS, OS/2, Mac, Amiga... The Python implementation is portable: it runs on many brands of UNIX, on Windows, DOS, OS/2, Mac, Amiga...
This package contains the documentation files for Python in HTML format. This package contains the documentation files for Python in HTML format.
%package tk %package tk
@ -171,9 +169,9 @@ cd Doc
#make PAPER=a4 pdf #make PAPER=a4 pdf
%endif %endif
rm -f `find %{buildroot}%{_docdir}/%{name}-%{version}/html/.buildinfo` rm -f `find %{buildroot}%{_docdir}/%{name}-%{version}/html/.buildinfo`
install -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.python3 install -D -m0644 %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.python3
install -D -m0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/rpm/pythondeps3.sh install -D -m0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/rpm/pythondeps3.sh
install -D -m0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/rpm/macros.pyver install -D -m0644 %{SOURCE3} %{buildroot}%{_rpmmacrodir}/macros.pyver
rm %{buildroot}%{_includedir}/python rm %{buildroot}%{_includedir}/python
rm %{buildroot}%{_bindir}/2to3 rm %{buildroot}%{_bindir}/2to3
@ -250,8 +248,8 @@ find %{_prefix}/lib/python%{majversion}/site-packages/*.egg-info -type d -empty
%files -n %{libname}-devel %files -n %{libname}-devel
%defattr(-,root,root) %defattr(-,root,root)
%{_sysconfdir}/rpm/macros.pyver %{_rpmmacrodir}/macros.pyver
%{_sysconfdir}/rpm/macros.python3 %{_rpmmacrodir}/macros.python3
%{_bindir}/python3-config %{_bindir}/python3-config
%{_bindir}/python%{majversion}-config %{_bindir}/python%{majversion}-config
%{_bindir}/python%{majversion}m-config %{_bindir}/python%{majversion}m-config
@ -277,6 +275,9 @@ find %{_prefix}/lib/python%{majversion}/site-packages/*.egg-info -type d -empty
%endif %endif
%changelog %changelog
* Wed Feb 02 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 3.7.12-2mamba
- macros.python3: use sysconfig instead of distutils
* Sun Dec 26 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 3.7.12-1mamba * Sun Dec 26 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 3.7.12-1mamba
- update to 3.7.12 - update to 3.7.12