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.
This commit is contained in:
parent
467c94cde8
commit
5551c1491d
14
gcc.spec
14
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}/
|
||||
|
Loading…
x
Reference in New Issue
Block a user