public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/gcc] rhel-f41-base: Replace homegrown byte compilation with %py_byte_compile
Date: Mon, 29 Jun 2026 12:30:39 GMT	[thread overview]
Message-ID: <178273623974.1.10399456823813177392.rpms-gcc-5551c1491d79@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/gcc
            Branch : rhel-f41-base
            Commit : 5551c1491d79b411a6440ed560ae2371ae32644a
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
            Date   : 2024-06-27T21:56:16+02:00
            Stats  : +2/-12 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/gcc/c/5551c1491d79b411a6440ed560ae2371ae32644a?branch=rhel-f41-base

            Log:
            Replace homegrown byte compilation with %py_byte_compile

Resolves https://bugzilla.redhat.com/show_bug.cgi?id=2294381.

Note that the 'touch -r' calls should not be necessary since
https://fedoraproject.org/wiki/Changes/ReproducibleBuildsClampMtimes.

---
diff --git a/gcc.spec b/gcc.spec
index 4f373b2..f8466bb 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1682,18 +1682,8 @@ fi
 mkdir -p %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}
 mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++*gdb.py* \
       %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/
-pushd ../libstdc++-v3/python
-for i in `find . -name \*.py`; do
-  touch -r $i %{buildroot}%{_prefix}/share/gcc-%{gcc_major}/python/$i
-done
-touch -r hook.in %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/libstdc++*gdb.py
-popd
-for f in `find %{buildroot}%{_prefix}/share/gcc-%{gcc_major}/python/ \
-	       %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/ -name \*.py`; do
-  r=${f/$RPM_BUILD_ROOT/}
-  %{__python3} -c 'import py_compile; py_compile.compile("'$f'", dfile="'$r'")'
-  %{__python3} -O -c 'import py_compile; py_compile.compile("'$f'", dfile="'$r'")'
-done
+%py_byte_compile %{python3} %{buildroot}%{_prefix}/share/gcc-%{gcc_major}/python/
+%py_byte_compile %{python3} %{buildroot}%{_datadir}/gdb/auto-load/%{_prefix}/%{_lib}/
 
 rm -f $FULLEPATH/libgccjit.so
 cp -a objlibgccjit/gcc/libgccjit.so* %{buildroot}%{_prefix}/%{_lib}/

                 reply	other threads:[~2026-06-29 12:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178273623974.1.10399456823813177392.rpms-gcc-5551c1491d79@fedoraproject.org \
    --to=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox