Restore %primary_interpreter
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python38?expand=0&rev=91
This commit is contained in:
parent
471da3977b
commit
b2d593bc85
@ -37,6 +37,11 @@
|
||||
%endif
|
||||
|
||||
%define python_pkg_name python38
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%define primary_interpreter 1
|
||||
%else
|
||||
%define primary_interpreter 0
|
||||
%endif
|
||||
|
||||
%define _version %(c=%{version}; echo ${c/[a-z]*/})
|
||||
%define tar_suffix %(c=%{_version}; echo ${c#%{_version}})
|
||||
@ -207,7 +212,7 @@ Requires: %{python_pkg_name}-base = %{version}
|
||||
Recommends: %{python_pkg_name}-curses
|
||||
Recommends: %{python_pkg_name}-dbm
|
||||
Recommends: %{python_pkg_name}-pip
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3 = %{python_version}
|
||||
%endif
|
||||
%endif
|
||||
@ -229,7 +234,7 @@ development environment (python3-idle).
|
||||
%package -n %{python_pkg_name}-tk
|
||||
Summary: TkInter, a Python Tk Interface
|
||||
Requires: %{python_pkg_name} = %{version}
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-tk = %{version}
|
||||
%endif
|
||||
|
||||
@ -239,7 +244,7 @@ Python interface to Tk. Tk is the GUI toolkit that comes with Tcl.
|
||||
%package -n %{python_pkg_name}-curses
|
||||
Summary: Python Interface to the (N)Curses Library
|
||||
Requires: %{python_pkg_name} = %{version}
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-curses
|
||||
%endif
|
||||
|
||||
@ -250,7 +255,7 @@ Console User Interface.
|
||||
%package -n %{python_pkg_name}-dbm
|
||||
Summary: Python Interface to the GDBM Library
|
||||
Requires: %{python_pkg_name} = %{version}
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-dbm
|
||||
%endif
|
||||
|
||||
@ -262,7 +267,7 @@ the GNU implementation GDBM.
|
||||
Summary: An Integrated Development Environment for Python
|
||||
Requires: %{python_pkg_name} = %{version}
|
||||
Requires: %{python_pkg_name}-tk
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-idle = %{version}
|
||||
%endif
|
||||
|
||||
@ -275,7 +280,7 @@ a debugger.
|
||||
%package -n %{python_pkg_name}-doc
|
||||
Summary: Package Documentation for Python 3
|
||||
Enhances: %{python_pkg_name} = %{python_version}
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-doc = %{version}
|
||||
%endif
|
||||
|
||||
@ -286,7 +291,7 @@ Python, and Macintosh Module Reference in HTML format.
|
||||
|
||||
%package -n %{python_pkg_name}-doc-devhelp
|
||||
Summary: Additional Package Documentation for Python 3 in devhelp format
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-doc-devhelp = %{version}
|
||||
%endif
|
||||
|
||||
@ -310,7 +315,7 @@ Provides: %{python_pkg_name}-asyncio = %{version}
|
||||
Provides: %{python_pkg_name}-typing = %{version}
|
||||
# python3-xml was merged into python3, now moved into -base
|
||||
Provides: %{python_pkg_name}-xml = %{version}
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-asyncio = %{version}
|
||||
Obsoletes: python3-asyncio < %{version}
|
||||
Provides: python3-base = %{version}
|
||||
@ -337,7 +342,7 @@ Summary: Python Utility and Demonstration Scripts
|
||||
Requires: %{python_pkg_name}-base = %{version}
|
||||
Provides: %{python_pkg_name}-2to3 = %{version}
|
||||
Provides: %{python_pkg_name}-demo = %{version}
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-2to3 = %{version}
|
||||
Provides: python3-demo = %{version}
|
||||
Provides: python3-tools = %{version}
|
||||
@ -352,7 +357,7 @@ and a set of demonstration programs.
|
||||
%package -n %{python_pkg_name}-devel
|
||||
Summary: Include Files and Libraries Mandatory for Building Python Modules
|
||||
Requires: %{python_pkg_name}-base = %{version}
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-devel = %{version}
|
||||
%endif
|
||||
|
||||
@ -371,7 +376,7 @@ package up to version 2.2.2.
|
||||
Summary: Unit tests for Python and its standard library
|
||||
Requires: %{python_pkg_name} = %{version}
|
||||
Requires: %{python_pkg_name}-tk = %{version}
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
Provides: python3-testsuite = %{version}
|
||||
%endif
|
||||
|
||||
@ -425,7 +430,7 @@ other applications.
|
||||
# drop Autoconf version requirement
|
||||
sed -i 's/^AC_PREREQ/dnl AC_PREREQ/' configure.ac
|
||||
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
# fix shebangs - convert /usr/local/bin/python and /usr/bin/env/python to /usr/bin/python3
|
||||
for dir in Lib Tools; do
|
||||
# find *.py, filter to files that contain bad shebangs
|
||||
@ -668,7 +673,7 @@ rm -fv %{buildroot}%{dynlib nis}
|
||||
ln -sf python%{python_version} %{buildroot}%{_bindir}/python3
|
||||
|
||||
# decide to ship python3 or just python3.X
|
||||
%if "%{python_pkg_name}" != "%{primary_python}"
|
||||
%if !%{primary_interpreter}
|
||||
# base
|
||||
rm %{buildroot}%{_bindir}/python3
|
||||
rm %{buildroot}%{_bindir}/pydoc3
|
||||
@ -686,7 +691,7 @@ ln -s ../../libpython%{python_abi}.so %{buildroot}%{_libdir}/python%{python_vers
|
||||
rm %{buildroot}%{_bindir}/idle3*
|
||||
|
||||
# delete the generic 2to3 binary if we are not primary
|
||||
%if "%{python_pkg_name}" != "%{primary_python}"
|
||||
%if !%{primary_interpreter}
|
||||
rm %{buildroot}%{_bindir}/2to3
|
||||
%endif
|
||||
|
||||
@ -718,7 +723,7 @@ install -m 755 -D Tools/gdb/libpython.py %{buildroot}%{_datadir}/gdb/auto-load/%
|
||||
# RPM macros
|
||||
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/
|
||||
# primary python3 macros
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
install -m 644 %{SOURCE7} %{buildroot}%{_rpmconfigdir}/macros.d/ # macros.python3
|
||||
%endif
|
||||
# flavor specific macros, only to be supplied "if we are in the buildset", e.g. installed.
|
||||
@ -824,7 +829,7 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo
|
||||
%files -n %{python_pkg_name}-tools
|
||||
%defattr(644, root, root, 755)
|
||||
%{sitedir}/turtledemo
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
%{_bindir}/2to3
|
||||
%endif
|
||||
%attr(755, root, root)%{_bindir}/2to3-%{python_version}
|
||||
@ -833,7 +838,7 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo
|
||||
%files -n %{python_pkg_name}-devel
|
||||
%defattr(644, root, root, 755)
|
||||
%{_libdir}/libpython%{python_abi}.so
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
%{_libdir}/libpython3.so
|
||||
%endif
|
||||
%{_libdir}/pkgconfig/*
|
||||
@ -841,7 +846,7 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo
|
||||
%{sitedir}/config-%{python_abi}-*
|
||||
%defattr(755, root, root)
|
||||
%{_bindir}/python%{python_abi}-config
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
%{_bindir}/python3-config
|
||||
%endif
|
||||
# Own these directories to not depend on gdb
|
||||
@ -874,14 +879,14 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo
|
||||
%doc %{_docdir}/%{name}/README.rst
|
||||
%license LICENSE
|
||||
%doc %{_docdir}/%{name}/README.SUSE
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
%{_mandir}/man1/python3.1%{?ext_man}
|
||||
%endif
|
||||
%{_mandir}/man1/python%{python_version}.1%{?ext_man}
|
||||
# license text, not a doc because the code can use it at run-time
|
||||
%{sitedir}/LICENSE.txt
|
||||
# RPM macros
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
%{_rpmconfigdir}/macros.d/macros.python3
|
||||
%endif
|
||||
%{_rpmconfigdir}/macros.d/macros.%{python_pkg_name}
|
||||
@ -985,7 +990,7 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo
|
||||
%{sitedir}/_import_failed
|
||||
%{sitedir}/site-packages/zzzz-import-failed-hooks.pth
|
||||
# symlinks
|
||||
%if "%{python_pkg_name}" == "%{primary_python}"
|
||||
%if %{primary_interpreter}
|
||||
%{_bindir}/python3
|
||||
%{_bindir}/pydoc3
|
||||
%endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user