Accepting request 928691 from home:msmeissn:branches:devel:languages:python:Factory

- on sle12, python2 modules will still be called python-xxxx until EOL,
  for newer SLE versions they will be python2-xxxx

OBS-URL: https://build.opensuse.org/request/show/928691
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=308
This commit is contained in:
2021-11-02 19:29:32 +00:00
committed by Git OBS Bridge
parent a1e48140c5
commit b580dedff6
4 changed files with 14 additions and 0 deletions

View File

@@ -367,6 +367,12 @@ find . -name '*.py' -type f | grep -vE "^./Parser/|^./Python/" \
install -m 644 %{SOURCE5} %{buildroot}%{_libdir}/python%{python_version}/site-packages/_local.pth
install -d -m 755 %{buildroot}%{_rpmconfigdir}/macros.d/
install -m 644 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/
%if %{suse_version} < 1500
# on SLE12 and SLE11 the python2 modules will still be called python-xxxx
# as this SPEC file is used on SLE12, keep it in here for the time being
sed -i -e 's/python2_package_prefix python2/python2_package_prefix python/;' %{buildroot}%{_rpmconfigdir}/macros.d/macros.python2
%endif
# make sure /usr/lib/python/site-packages exists even on lib64 machines
mkdir -p %{buildroot}%{_prefix}/lib/python%{python_version}/site-packages
########################################