From 4704498937706c1b9842062fdc8d63fd9003453d Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Nov 22 2017 16:27:59 +0000 Subject: Set the correct shebangs and fix post/un's --- diff --git a/python3.spec b/python3.spec index 0c91898..96bcaac 100644 --- a/python3.spec +++ b/python3.spec @@ -1002,7 +1002,11 @@ sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \ # so handle files named using other naming scheme separately. LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \ Tools/scripts/pathfix.py \ +%if %{with platform_python} + -i "%{_libexecdir}/platform-python" \ +%else -i "%{_bindir}/python%{pybasever}" \ +%endif # with platform_python %{buildroot} %{buildroot}%{pylibdir}/Tools/scripts/*-*.py \ %{buildroot}%{pylibdir}/Tools/pynche/{pynche,pynche.pyw} # not covered, also redundant and useless: @@ -1039,6 +1043,9 @@ rm %{buildroot}%{pylibdir}/LICENSE.txt # Do bytecompilation with the newly installed interpreter. # This is similar to the script in macros.pybytecompile # compile *.pyc +# Platform-Python note: +# We're compiling with the /usr/bin/python3.X executable as +# the /usr/libexec/platform-python executable is created later in the spec find %{buildroot} -type f -a -name "*.py" -print0 | \ LD_LIBRARY_PATH="%{buildroot}%{dynload_dir}/:%{buildroot}%{_libdir}" \ PYTHONPATH="%{buildroot}%{_libdir}/python%{pybasever} %{buildroot}%{_libdir}/python%{pybasever}/site-packages" \ @@ -1186,9 +1193,9 @@ CheckPython optimized # Scriptlets # ====================================================== -%post libs -p /sbin/ldconfig +%post -n python%{python3_pkgversion}-libs -p /sbin/ldconfig -%postun libs -p /sbin/ldconfig +%postun -n python%{python3_pkgversion}-libs -p /sbin/ldconfig %post /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :