Macros to py38

This commit is contained in:
Mikhail Novosyolov 2020-05-19 15:22:48 +03:00
parent 1bf31abf5f
commit ac4ad75610
2 changed files with 18 additions and 20 deletions

View file

@ -1,25 +1,25 @@
%__python3 /usr/bin/python3
%python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
%python3_version %(%{__python3} -c "import sys; print(sys.version[0:3])")
%py3_ver %(%{__python3} -c "import sys; v=sys.version_info[:2]; print('%%d.%%d'%%v)" 2>/dev/null || echo PYTHON-NOT-FOUND)
%py3_prefix %(%{__python3} -c "import sys; print(sys.prefix)" 2>/dev/null || echo PYTHON-NOT-FOUND)
%py3_platsitedir %python3_sitearch
%py3_puresitedir %python3_sitelib
%py3_incdir %(%{__python3} -c 'from distutils.sysconfig import get_python_inc; print(get_python_inc())' 2>/dev/null || echo PYTHON-INCLUDEDIR-NOT-FOUND)
%py3dir %{_builddir}/python3-%{name}-%{version}-%{release}
%__python38 /usr/bin/python38
%python38_sitelib %(%{__python38} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%python38_sitearch %(%{__python38} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
%python38_version %(%{__python38} -c "import sys; print(sys.version[0:3])")
%py38_ver %(%{__python38} -c "import sys; v=sys.version_info[:2]; print('%%d.%%d'%%v)" 2>/dev/null || echo PYTHON38-NOT-FOUND)
%py38_prefix %(%{__python38} -c "import sys; print(sys.prefix)" 2>/dev/null || echo PYTHON38-NOT-FOUND)
%py38_platsitedir %python38_sitearch
%py38_puresitedir %python38_sitelib
%py38_incdir %(%{__python38} -c 'from distutils.sysconfig import get_python_inc; print(get_python_inc())' 2>/dev/null || echo PYTHON38-INCLUDEDIR-NOT-FOUND)
%py38dir %{_builddir}/python38-%{name}-%{version}-%{release}
# %%py_setup setup.py # in rpm-openmandriva-setup
%py3_shbang_opts -s
%py38_shbang_opts -s
%py3_build() %{expand:\
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} build --executable="%{__python3} %{py3_shbang_opts}" %{?*}\
%py38_build() %{expand:\
CFLAGS="%{optflags}" %{__python38} %{py_setup} %{?py_setup_args} build --executable="%{__python38} %{py3_shbang_opts}" %{?*}\
}
%py3_install() %{expand:\
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}\
%py38_install() %{expand:\
CFLAGS="%{optflags}" %{__python38} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}\
}
%py3_test() %{expand:\
%{__python3} %{py_setup} %{?py_setup_args} test %{?1}\
%py38_test() %{expand:\
%{__python38} %{py_setup} %{?py_setup_args} test %{?1}\
}

View file

@ -51,7 +51,7 @@
Summary: An interpreted, interactive object-oriented programming language
Name: %{py3_name}
Version: 3.8.2
Release: 1
Release: 2
License: Modified CNRI Open Source License
Group: Development/Python
@ -425,7 +425,6 @@ find %{buildroot} -type f -print | while read -r line ; do
fi
done
### warning!!! replaced only python3 with python3.8, macros are still the same ###
%if %rpm4
cp -fr %{S:2} %{buildroot}%{_rpmmacrodir}/python38.macros
%else
@ -434,7 +433,6 @@ rm -fr %{buildroot}%{_bindir}/{2to3,idle3,pydoc,pydoc3,python,python3,python3-co
rm -fr %{buildroot}%{_libdir}/libpython3.so
rm -fr %{buildroot}%{_libdir}/pkgconfig/python3.pc
%endif
sed -i -e "1s|/usr/bin/python3|/usr/bin/python3.8|" %{buildroot}%{_rpmmacrodir}/*python38*
%endif
%check