From d7a3b52d724b394b9d1912ed7f3a427b3ec77fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 26 Jul 2018 13:44:49 +0200 Subject: [PATCH] Add /usr/bin/pygettext3.py and msgfmt3.py to python3-devel Resolves: rhbz#1571474 --- check-pyc-and-pyo-timestamps.py | 4 ++++ python36.spec | 22 +++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/check-pyc-and-pyo-timestamps.py b/check-pyc-and-pyo-timestamps.py index 262a985..ab75c9f 100644 --- a/check-pyc-and-pyo-timestamps.py +++ b/check-pyc-and-pyo-timestamps.py @@ -7,6 +7,10 @@ import sys # list of test and other files that we expect not to have bytecode not_compiled = [ '/usr/bin/pathfix.py', + '/usr/bin/pygettext3.py', + f'/usr/bin/pygettext{sys.version[:3]}.py', + '/usr/bin/msgfmt3.py', + f'/usr/bin/msgfmt{sys.version[:3]}.py', 'test/bad_coding.py', 'test/bad_coding2.py', 'test/badsyntax_3131.py', diff --git a/python36.spec b/python36.spec index c58822f..c0e16e4 100644 --- a/python36.spec +++ b/python36.spec @@ -14,7 +14,7 @@ URL: https://www.python.org/ # WARNING When rebasing to a new Python version, # remember to update the python3-docs package as well Version: %{pybasever}.6 -Release: 4%{?dist} +Release: 5%{?dist} License: Python @@ -927,6 +927,14 @@ sed -i -e "s/'pyconfig.h'/'%{_pyconfig_h}'/" \ # See https://github.com/fedora-python/python-rpm-porting/issues/24 cp -p Tools/scripts/pathfix.py %{buildroot}%{_bindir}/ +# Install i18n tools to bindir +# They are also in python2, so we version them +# https://bugzilla.redhat.com/show_bug.cgi?id=1571474 +for tool in pygettext msgfmt; do + cp -p Tools/i18n/${tool}.py %{buildroot}%{_bindir}/${tool}%{pybasever}.py + ln -s ${tool}%{pybasever}.py %{buildroot}%{_bindir}/${tool}3.py +done + # Switch all shebangs to refer to the specific Python version. # This currently only covers files matching ^[a-zA-Z0-9_]+\.py$, # so handle files named using other naming scheme separately. @@ -934,6 +942,7 @@ LD_LIBRARY_PATH=./build/optimized ./build/optimized/python \ Tools/scripts/pathfix.py \ -i "%{_bindir}/python%{pybasever}" -pn \ %{buildroot} \ + %{buildroot}%{_bindir}/*%{pybasever}.py \ %{?with_gdb_hooks:%{buildroot}$DirHoldingGdbPy/*.py} # Remove tests for python3-tools which was removed in @@ -993,6 +1002,8 @@ ln -s %{_bindir}/python%{pybasever} %{buildroot}%{_libexecdir}/system-python rm %{buildroot}%{_bindir}/python3 rm %{buildroot}%{_bindir}/pydoc3 rm %{buildroot}%{_bindir}/pathfix.py +rm %{buildroot}%{_bindir}/pygettext3.py +rm %{buildroot}%{_bindir}/msgfmt3.py rm %{buildroot}%{_bindir}/idle3 rm %{buildroot}%{_bindir}/python3-* rm %{buildroot}%{_bindir}/pyvenv @@ -1350,8 +1361,13 @@ CheckPython optimized %{_bindir}/python3-config %{_libdir}/pkgconfig/python3.pc %{_bindir}/pathfix.py +%{_bindir}/pygettext3.py +%{_bindir}/msgfmt3.py %endif +%{_bindir}/pygettext%{pybasever}.py +%{_bindir}/msgfmt%{pybasever}.py + %{_bindir}/python%{pybasever}-config %{_bindir}/python%{LDVERSION_optimized}-config %{_bindir}/python%{LDVERSION_optimized}-*-config @@ -1542,6 +1558,10 @@ CheckPython optimized # ====================================================== %changelog +* Fri Aug 17 2018 Miro Hrončok - 3.6.6-5 +- Add /usr/bin/pygettext3.py and msgfmt3.py to python3-devel +Resolves: rhbz#1571474 + * Wed Aug 15 2018 Miro Hrončok - 3.6.6-4 - Use RPM built wheels of pip and setuptools in ensurepip instead of our rewheel patch