- Remove main python3 files from -base based whether we are
primary interpreter or not OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python38?expand=0&rev=9
This commit is contained in:
parent
1553080af8
commit
5c8138e56b
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 10 09:56:28 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Remove main python3 files from -base based whether we are
|
||||||
|
primary interpreter or not
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 10 09:35:29 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
Fri Jul 10 09:35:29 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
@ -641,12 +641,24 @@ rm -fv %{buildroot}%{dynlib nis}
|
|||||||
# overwrite the copied binary with a link
|
# overwrite the copied binary with a link
|
||||||
ln -sf python%{python_version} %{buildroot}%{_bindir}/python3
|
ln -sf python%{python_version} %{buildroot}%{_bindir}/python3
|
||||||
|
|
||||||
|
# decide to ship python3 or just python3.X
|
||||||
|
%if !%{primary_interpreter}
|
||||||
|
rm %{buildroot}%{_bindir}/python3
|
||||||
|
rm %{buildroot}%{_bindir}/pydocs3
|
||||||
|
rm %{buildroot}%{_mandir}/man1/python3.1
|
||||||
|
%endif
|
||||||
|
|
||||||
# link shared library instead of static library that tools expect
|
# link shared library instead of static library that tools expect
|
||||||
ln -s ../../libpython%{python_abi}.so %{buildroot}%{_libdir}/python%{python_version}/config-%{python_abi}-%{archname}-%{_os}%{?_gnu}%{?armsuffix}/libpython%{python_abi}.so
|
ln -s ../../libpython%{python_abi}.so %{buildroot}%{_libdir}/python%{python_version}/config-%{python_abi}-%{archname}-%{_os}%{?_gnu}%{?armsuffix}/libpython%{python_abi}.so
|
||||||
|
|
||||||
# delete idle3, which has to many packaging dependencies for base
|
# delete idle3, which has to many packaging dependencies for base
|
||||||
rm %{buildroot}%{_bindir}/idle3*
|
rm %{buildroot}%{_bindir}/idle3*
|
||||||
|
|
||||||
|
# delete the generic 2to3 binary if we are not primary
|
||||||
|
%if !%{primary_interpreter}
|
||||||
|
rm %{buildroot}%{_bindir}2to3
|
||||||
|
%endif
|
||||||
|
|
||||||
# replace duplicate .pyo/.pyc with hardlinks
|
# replace duplicate .pyo/.pyc with hardlinks
|
||||||
%fdupes %{buildroot}/%{sitedir}
|
%fdupes %{buildroot}/%{sitedir}
|
||||||
|
|
||||||
@ -673,8 +685,10 @@ install -m 755 -D Tools/gdb/libpython.py %{buildroot}%{_datadir}/gdb/auto-load/%
|
|||||||
#cp Makefile Makefile.pre.in Makefile.pre $RPM_BUILD_ROOT%{sitedir}/config-%{python_abi}/
|
#cp Makefile Makefile.pre.in Makefile.pre $RPM_BUILD_ROOT%{sitedir}/config-%{python_abi}/
|
||||||
|
|
||||||
# RPM macros
|
# RPM macros
|
||||||
|
%if %{primary_interpreter}
|
||||||
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/
|
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/
|
||||||
install -m 644 %{SOURCE7} %{buildroot}%{_rpmconfigdir}/macros.d/ # macros.python3
|
install -m 644 %{SOURCE7} %{buildroot}%{_rpmconfigdir}/macros.d/ # macros.python3
|
||||||
|
%endif
|
||||||
|
|
||||||
# import_failed hooks
|
# import_failed hooks
|
||||||
FAILDIR=%{buildroot}/%{sitedir}/_import_failed
|
FAILDIR=%{buildroot}/%{sitedir}/_import_failed
|
||||||
@ -773,7 +787,9 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo
|
|||||||
%files -n %{python_pkg_name}-tools
|
%files -n %{python_pkg_name}-tools
|
||||||
%defattr(644, root, root, 755)
|
%defattr(644, root, root, 755)
|
||||||
%{sitedir}/turtledemo
|
%{sitedir}/turtledemo
|
||||||
|
%if %{primary_interpreter}
|
||||||
%{_bindir}/2to3
|
%{_bindir}/2to3
|
||||||
|
%endif
|
||||||
%attr(755, root, root)%{_bindir}/2to3-%{python_version}
|
%attr(755, root, root)%{_bindir}/2to3-%{python_version}
|
||||||
%doc %{_docdir}/%{name}/Tools
|
%doc %{_docdir}/%{name}/Tools
|
||||||
|
|
||||||
@ -818,13 +834,16 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo
|
|||||||
%doc %{_docdir}/%{name}/README.rst
|
%doc %{_docdir}/%{name}/README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc %{_docdir}/%{name}/README.SUSE
|
%doc %{_docdir}/%{name}/README.SUSE
|
||||||
|
%if %{primary_interpreter}
|
||||||
%{_mandir}/man1/python3.1%{?ext_man}
|
%{_mandir}/man1/python3.1%{?ext_man}
|
||||||
|
%endif
|
||||||
%{_mandir}/man1/python%{python_version}.1%{?ext_man}
|
%{_mandir}/man1/python%{python_version}.1%{?ext_man}
|
||||||
# license text, not a doc because the code can use it at run-time
|
# license text, not a doc because the code can use it at run-time
|
||||||
%{sitedir}/LICENSE.txt
|
%{sitedir}/LICENSE.txt
|
||||||
# RPM macros
|
# RPM macros
|
||||||
|
%if %{primary_interpreter}
|
||||||
%{_rpmconfigdir}/macros.d/macros.python3
|
%{_rpmconfigdir}/macros.d/macros.python3
|
||||||
|
%endif
|
||||||
# binary parts
|
# binary parts
|
||||||
%dir %{sitedir}/lib-dynload
|
%dir %{sitedir}/lib-dynload
|
||||||
%{dynlib array}
|
%{dynlib array}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user