fix versions for pythondeps312.sh and macros.python312 [release 3.12.0-2mamba;Tue Oct 10 2023]

This commit is contained in:
Silvan Calarco 2024-01-05 16:58:53 +01:00
parent a9b29d87cc
commit 147be368f6
3 changed files with 22 additions and 19 deletions

View File

@ -1,4 +1,4 @@
%__python311 /usr/bin/python3.11
%__python312 /usr/bin/python3.12
#------------------------------------------------------------------------
# python(...) configuration.
#
@ -6,21 +6,21 @@
#
# Note: Used iff _use_internal_dependency_generator is non-zero. The
# helpers are also used by %{_usrlibrpm}/rpmdeps {--provides|--requires}.
%__python311_provides %{_usrlibrpm}/pythondeps311.sh --provides
%__python311_requires %{_usrlibrpm}/pythondeps311.sh --requires
%__python312_provides %{_usrlibrpm}/pythondeps312.sh --provides
%__python312_requires %{_usrlibrpm}/pythondeps312.sh --requires
# Useful macros for building *.rpm python packages (for python > 1.6).
#
%python311_sitearch %(%{__python311} -c "from sysconfig import get_paths; print(get_paths()['platlib'])")
%python311_sitelib %(%{__python311} -c "from sysconfig import get_paths; print(get_paths()['purelib'])")
%python311_inc %(%{__python311} -c "from sysconfig import get_paths; print(get_paths()['include'])")
%python311_version %(%{__python311} -c "import sys; print(sys.version[0:4])")
%python312_sitearch %(%{__python312} -c "from sysconfig import get_paths; print(get_paths()['platlib'])")
%python312_sitelib %(%{__python312} -c "from sysconfig import get_paths; print(get_paths()['purelib'])")
%python312_inc %(%{__python312} -c "from sysconfig import get_paths; print(get_paths()['include'])")
%python312_version %(%{__python312} -c "import sys; print(sys.version[0:4])")
%py311_compile(O) \
%py312_compile(O) \
find %1 -name '*.pyc' -name '*.pyo' -exec rm -f {} \\; \
%{__python311} %{?O:-O} -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
%{__python312} %{?O:-O} -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
%py311_requires(d) \
%define maxver %(%{__python311} -c "import sys; a,b=sys.version_info[:2]; print('%%d.%%d'%%(a,b+1))" 2>/dev/null || echo PYTHON-NOT-FOUND) \
BuildRequires: python311, libpython311-devel \
Requires(pre): python311 >= %{python311_version}, python311 < %{maxver}
%py312_requires(d) \
%define maxver %(%{__python312} -c "import sys; a,b=sys.version_info[:2]; print('%%d.%%d'%%(a,b+1))" 2>/dev/null || echo PYTHON-NOT-FOUND) \
BuildRequires: python312, libpython312-devel \
Requires(pre): python312 >= %{python312_version}, python312 < %{maxver}

View File

@ -4,7 +4,7 @@
%define __libdir %{_libdir}
Name: python312
Version: 3.12.0
Release: 1mamba
Release: 2mamba
Summary: An interpreted, interactive, object-oriented programming language
Group: Applications/Development
Vendor: openmamba
@ -12,8 +12,8 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.python.org
Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.xz
Source1: macros.python311
Source2: pythondeps311.sh
Source1: macros.python312
Source2: pythondeps312.sh
Patch0: python-2.4.2-tex3-fix.patch
Patch1: python-2.4.2-cgi.patch
Patch2: python-2.7.3-use_system_Sphinx.patch
@ -166,8 +166,8 @@ rm -f `find %{buildroot}%{_defaultdocdir}/%{name}-%{version}/html/.cvsignore`
__DISABLED_SPHINX_4
%endif
rm -f `find %{buildroot}%{_docdir}/%{name}-%{version}/html/.buildinfo`
install -D -m0644 %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.python311
install -D -m0755 %{SOURCE2} %{buildroot}%{_prefix}/lib/rpm/pythondeps311.sh
install -D -m0644 %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.python312
install -D -m0755 %{SOURCE2} %{buildroot}%{_prefix}/lib/rpm/pythondeps312.sh
#rm %{buildroot}%{_includedir}/python
rm %{buildroot}%{_bindir}/2to3
@ -279,6 +279,9 @@ find %{__libdir}/python%{majversion}/site-packages -name *.egg-info -type d -emp
%endif
%changelog
* Tue Oct 10 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 3.12.0-2mamba
- fix versions for pythondeps312.sh and macros.python312
* Mon Oct 02 2023 Automatic Build System <autodist@mambasoft.it> 3.12.0-1mamba
- automatic version update by autodist

View File

@ -5,7 +5,7 @@
exit 0
}
PYVER=`python3.11 -c "import sys; v=sys.version_info[:2]; print ('%d.%d'%v)"`
PYVER=`python3.12 -c "import sys; v=sys.version_info[:2]; print ('%d.%d'%v)"`
case $1 in
-P|--provides)
shift