python38/python38.macros
Mikhail Novosyolov 9eade514f9 fix typo in macros
2020-05-19 20:19:17 +03:00

25 lines
1.3 KiB
Text

%__python38 /usr/bin/python3.8
%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
%py38_shbang_opts -s
%py38_build() %{expand:\
CFLAGS="%{optflags}" %{__python38} %{py_setup} %{?py_setup_args} build --executable="%{__python38} %{py38_shbang_opts}" %{?*}\
}
%py38_install() %{expand:\
CFLAGS="%{optflags}" %{__python38} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}\
}
%py38_test() %{expand:\
%{__python38} %{py_setup} %{?py_setup_args} test %{?1}\
}