From 7f4063f9b8202a411794ca9d7a9e426dc406637866664d18fcab5f47048dbd2e Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 11 Dec 2019 16:37:24 +0000 Subject: [PATCH] Accepting request 755898 from home:mcepl:branches:devel:languages:python:Factory - Unify packages among openSUSE:Factory and SLE versions. (bsc#1159035) - Add idle.desktop and idle.appdata.xml to provide IDLE in menus (bsc#1153830) - Add python2_split_startup Provide to make it possible to conflict older packages by shared-python-startup. OBS-URL: https://build.opensuse.org/request/show/755898 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=262 --- idle.appdata.xml | 35 +++++++++++++++++++++++++++++++++++ idle.desktop | 11 +++++++++++ python-base.changes | 14 ++++++++++++++ python-doc.changes | 14 ++++++++++++++ python.changes | 14 ++++++++++++++ python.spec | 28 ++++++++++++++++++++++++++++ 6 files changed, 116 insertions(+) create mode 100644 idle.appdata.xml create mode 100644 idle.desktop diff --git a/idle.appdata.xml b/idle.appdata.xml new file mode 100644 index 0000000..6ede16e --- /dev/null +++ b/idle.appdata.xml @@ -0,0 +1,35 @@ + + + + + idle.desktop + IDLE + CC0 + Python-2.0 + Python Integrated Development and Learning Environment + +

+ IDLE is Python’s Integrated Development and Learning Environment. + The GUI is uniform between Windows, Unix, and Mac OS X. + IDLE provides an easy way to start writing, running, and debugging + Python code. +

+

+ IDLE is written in pure Python, and uses the tkinter GUI toolkit. + It provides: +

+
    +
  • a Python shell window (interactive interpreter) with colorizing of code input, output, and error messages,
  • +
  • a multi-window text editor with multiple undo, Python colorizing, smart indent, call tips, auto completion, and other features,
  • +
  • search within any window, replace within editor windows, and search through multiple files (grep),
  • +
  • a debugger with persistent breakpoints, stepping, and viewing of global and local namespaces.
  • +
+
+ https://docs.python.org/2.7/library/idle.html + + http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-main-window.png + http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-class-browser.png + http://in.waw.pl/~zbyszek/fedora/idle3-appdata/idle3-code-viewer.png + + zbyszek@in.waw.pl +
diff --git a/idle.desktop b/idle.desktop new file mode 100644 index 0000000..b0d0691 --- /dev/null +++ b/idle.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Name=IDLE +Comment=Python 2.7 Integrated Development and Learning Environment +Exec=idle %F +TryExec=idle +Terminal=false +Type=Application +Icon=idle +Categories=Development;IDE; +MimeType=text/x-python; diff --git a/python-base.changes b/python-base.changes index 1e3481d..bae3a24 100644 --- a/python-base.changes +++ b/python-base.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Wed Dec 11 14:35:46 CET 2019 - Matej Cepl + +- Unify packages among openSUSE:Factory and SLE versions. + (bsc#1159035) +- Add idle.desktop and idle.appdata.xml to provide IDLE in menus + (bsc#1153830) + +------------------------------------------------------------------- +Wed Dec 4 18:12:17 CET 2019 - Matej Cepl + +- Add python2_split_startup Provide to make it possible to + conflict older packages by shared-python-startup. + ------------------------------------------------------------------- Fri Nov 22 13:10:03 CET 2019 - Matej Cepl diff --git a/python-doc.changes b/python-doc.changes index 1e3481d..bae3a24 100644 --- a/python-doc.changes +++ b/python-doc.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Wed Dec 11 14:35:46 CET 2019 - Matej Cepl + +- Unify packages among openSUSE:Factory and SLE versions. + (bsc#1159035) +- Add idle.desktop and idle.appdata.xml to provide IDLE in menus + (bsc#1153830) + +------------------------------------------------------------------- +Wed Dec 4 18:12:17 CET 2019 - Matej Cepl + +- Add python2_split_startup Provide to make it possible to + conflict older packages by shared-python-startup. + ------------------------------------------------------------------- Fri Nov 22 13:10:03 CET 2019 - Matej Cepl diff --git a/python.changes b/python.changes index 1e3481d..bae3a24 100644 --- a/python.changes +++ b/python.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Wed Dec 11 14:35:46 CET 2019 - Matej Cepl + +- Unify packages among openSUSE:Factory and SLE versions. + (bsc#1159035) +- Add idle.desktop and idle.appdata.xml to provide IDLE in menus + (bsc#1153830) + +------------------------------------------------------------------- +Wed Dec 4 18:12:17 CET 2019 - Matej Cepl + +- Add python2_split_startup Provide to make it possible to + conflict older packages by shared-python-startup. + ------------------------------------------------------------------- Fri Nov 22 13:10:03 CET 2019 - Matej Cepl diff --git a/python.spec b/python.spec index 4809aab..41dcdf6 100644 --- a/python.spec +++ b/python.spec @@ -29,6 +29,8 @@ Source0: http://www.python.org/ftp/python/%{version}/%{tarname}.tar.xz Source1: README.SUSE Source8: sle_tls_checks_policy.py #Source11: testfiles.tar.bz2 +Source50: idle.appdata.xml +Source51: idle.desktop # issues with copyrighted Unicode testing files # !!!!!!!!!!!!!! @@ -100,14 +102,25 @@ BuildRequires: sqlite-devel BuildRequires: tk-devel BuildRequires: xz BuildRequires: pkgconfig(x11) +# for %%{_datadir}/application and %%{_datadir}/mime/packages +BuildRequires: filesystem +BuildRequires: update-desktop-files +# for %%{_datadir}/icons/hicolor directories +BuildRequires: hicolor-icon-theme +%if 0%{?suse_version} >= 1500 +BuildRequires: appstream-glib +%endif %define python_version %(echo %{tarversion} | head -c 3) %define idle_name idle Requires: python-base = %{version} %if %{suse_version} == 1315 && !0%{?is_opensuse} Recommends: python-strict-tls-check %endif +# To make older versions of this package to conflict with +# shared-python-startup I need a symbol to conflict with Provides: %{name} = %{python_version} Provides: python2 = %{version} +Provides: python2_split_startup Obsoletes: python-elementtree Obsoletes: python-nothreads Obsoletes: python-sqlite @@ -429,6 +442,16 @@ install -d -m755 %{buildroot}%{_sysconfdir}/%{idle_name} done ) +# Install .desktop, mime and appdata files from upstream tarball +%if 0%{?suse_version} >= 1500 +install -Dm0644 %{SOURCE50} %{buildroot}/%{_datadir}/mime/packages/idle.appdata.xml +appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/mime/packages/idle.appdata.xml +%endif +install -D -m 0644 Lib/idlelib/Icons/idle_16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/idle.png +install -D -m 0644 Lib/idlelib/Icons/idle_32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/idle.png +install -D -m 0644 Lib/idlelib/Icons/idle_48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/idle.png +desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE51} + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -444,6 +467,11 @@ install -d -m755 %{buildroot}%{_sysconfdir}/%{idle_name} %doc Lib/idlelib/ChangeLog %{_libdir}/python%{python_version}/idlelib %attr(755, root, root) %{_bindir}/%{idle_name} +%if 0%{?suse_version} >= 1500 +%{_datadir}/mime/packages/idle.appdata.xml +%endif +%{_datadir}/applications/idle.desktop +%{_datadir}/icons/hicolor/*/apps/idle.png %files demo %defattr(644, root, root, 755)