forked from pool/python38
- Fix idle to be co-installable
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python38?expand=0&rev=8
This commit is contained in:
parent
1c51f99915
commit
1553080af8
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 10 09:35:29 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Fix idle to be co-installable
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 10 08:44:54 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
@ -589,27 +589,34 @@ done
|
||||
|
||||
# Idle is not packaged in base due to the appstream-glib dependency
|
||||
# move idle config into /etc
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/idle3
|
||||
install -d -m 755 %{buildroot}%{_sysconfdir}/idle%{python_version}
|
||||
(
|
||||
cd %{buildroot}/%{sitedir}/idlelib/
|
||||
for file in *.def ; do
|
||||
mv $file %{buildroot}%{_sysconfdir}/idle3/
|
||||
ln -sf %{_sysconfdir}/idle3/$file %{buildroot}/%{sitedir}/idlelib/
|
||||
mv $file %{buildroot}%{_sysconfdir}/idle%{python_version}/
|
||||
ln -sf %{_sysconfdir}/idle%{python_version}/$file %{buildroot}/%{sitedir}/idlelib/
|
||||
done
|
||||
)
|
||||
|
||||
# keep just idle3.X
|
||||
rm %{buildroot}%{_bindir}/idle3
|
||||
|
||||
# install idle icons
|
||||
for size in 16 32 48 ; do
|
||||
install -m 644 -D Lib/idlelib/Icons/idle_${size}.png \
|
||||
%{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/idle3.png
|
||||
%{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/idle%{python_version}.png
|
||||
done
|
||||
|
||||
# install idle desktop file
|
||||
install -m 644 -D -t %{buildroot}%{_datadir}/applications %{SOURCE19}
|
||||
%suse_update_desktop_file idle3
|
||||
cp %{SOURCE19} idle%{python_version}.desktop
|
||||
sed -i -e 's:idle3:idle%{python_version}:g' idle%{python_version}.desktop
|
||||
install -m 644 -D -t %{buildroot}%{_datadir}/applications idle%{python_version}.desktop
|
||||
%suse_update_desktop_file idle%{python_version}
|
||||
|
||||
install -m 644 -D -t %{buildroot}%{_datadir}/metainfo %{SOURCE20}
|
||||
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/idle3.appdata.xml
|
||||
cp %{SOURCE20} idle%{python_version}.appdata.xml
|
||||
sed -i -e 's:idle3.desktop:idle%{python_version}.desktop:g' idle%{python_version}.appdata.xml
|
||||
install -m 644 -D -t %{buildroot}%{_datadir}/metainfo idle%{python_version}.appdata.xml
|
||||
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/idle%{python_version}.appdata.xml
|
||||
|
||||
%fdupes %{buildroot}/%{_libdir}/python%{python_version}
|
||||
%endif
|
||||
@ -723,17 +730,17 @@ echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-impo
|
||||
%files -n %{python_pkg_name}-idle
|
||||
%defattr(644, root, root, 755)
|
||||
%{sitedir}/idlelib
|
||||
%dir %{_sysconfdir}/idle3
|
||||
%config %{_sysconfdir}/idle3/*
|
||||
%dir %{_sysconfdir}/idle%{python_version}
|
||||
%config %{_sysconfdir}/idle%{python_version}/*
|
||||
%doc Lib/idlelib/NEWS.txt
|
||||
%doc Lib/idlelib/README.txt
|
||||
%doc Lib/idlelib/TODO.txt
|
||||
%doc Lib/idlelib/extend.txt
|
||||
%doc Lib/idlelib/ChangeLog
|
||||
%{_bindir}/idle3
|
||||
%{_datadir}/applications/idle3.desktop
|
||||
%{_datadir}/metainfo/idle3.appdata.xml
|
||||
%{_datadir}/icons/hicolor/*/apps/idle3.png
|
||||
%{_bindir}/idle%{python_version}
|
||||
%{_datadir}/applications/idle%{python_version}.desktop
|
||||
%{_datadir}/metainfo/idle%{python_version}.appdata.xml
|
||||
%{_datadir}/icons/hicolor/*/apps/idle%{python_version}.png
|
||||
%dir %{_datadir}/icons/hicolor
|
||||
%dir %{_datadir}/icons/hicolor/16x16
|
||||
%dir %{_datadir}/icons/hicolor/32x32
|
||||
|
Loading…
Reference in New Issue
Block a user