%global srcname pyzo %global sum The Interactive editor for scientific Python Name: python-%{srcname} Version: 4.3.1 Release: 1%{?dist} Summary: %{sum} Group: Development/Tools License: BSD URL: http://pyzo.org Source0: https://github.com/%{srcname}/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz Patch0: %{name}-4.3.1-appdata.patch Patch1: %{name}-4.3.1-desktop.patch BuildArch: noarch BuildRequires: desktop-file-utils BuildRequires: python-sphinx BuildRequires: python3-devel %package -n python3-%{srcname} Summary: %{sum} Requires: font(dejavusansmono) Requires: font(sourcecodepro) Requires: python3-PyQt4 Requires(post): desktop-file-utils Requires(postun): desktop-file-utils %{?python_provide:%python_provide python3-%{srcname}} # Pyzo replaces both IEP and pyzolib Obsoletes: python3-iep <= 3.7 Obsoletes: python3-pyzolib <= 0.3.4 %description Pyzo is a cross-platform Python IDE focused on interactivity and introspection, which makes it very suitable for scientific computing. Its practical design is aimed at simplicity and efficiency. It consists of two main components, the editor and the shell, and uses a set of pluggable tools to help the programmer in various ways. Some example tools are source structure, project manager, interactive help, workspace ... %description -n python3-%{srcname} Pyzo is a cross-platform Python IDE focused on interactivity and introspection, which makes it very suitable for scientific computing. Its practical design is aimed at simplicity and efficiency. It consists of two main components, the editor and the shell, and uses a set of pluggable tools to help the programmer in various ways. Some example tools are source structure, project manager, interactive help, workspace ... %prep %autosetup -p1 -n%{srcname}-%{version} # Remove the unused style files (not yet implemented in Pyzo) rm -f %{srcname}/resources/style_*.ssdf # Fix non-executable scripts sed -i '1{\@^#!/usr/bin/env python@d}' \ %{srcname}/__init__.py \ %{srcname}/__main__.py \ %{srcname}/codeeditor/_test.py \ %{srcname}/%{srcname}kernel/guisupport.py \ # Remove bundled fonts which Fedora provides rm -f \ %{srcname}/resources/fonts/DejaVuSansMono-BoldOblique.ttf \ %{srcname}/resources/fonts/DejaVuSansMono-Bold.ttf \ %{srcname}/resources/fonts/DejaVuSansMono-Oblique.ttf \ %{srcname}/resources/fonts/DejaVuSansMono.ttf \ %{srcname}/resources/fonts/linux_fonts.conf \ %{srcname}/resources/fonts/SourceCodePro-Bold.otf \ %{srcname}/resources/fonts/SourceCodePro-Regular.otf \ # Try to remove the now empty fonts directory rmdir %{srcname}/resources/fonts/ %build %py3_build make %{?_smp_mflags} -C doc html man rm -f doc/_build/html/.buildinfo %install %py3_install install -D -m0644 doc/_build/man/%{srcname}.1 %{buildroot}%{_mandir}/man1/%{srcname}.1 install -D -m0644 %{srcname}.appdata.xml %{buildroot}%{_datadir}/appdata/%{srcname}.appdata.xml desktop-file-install \ --dir=%{buildroot}%{_datadir}/applications \ %{srcname}/resources/%{srcname}.desktop \ for i in 16 32 48 64 128 256; do install -D -m0644 %{srcname}/resources/appicons/%{srcname}logo${i}.png \ %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{srcname}.png done %check desktop-file-validate %{buildroot}/%{_datadir}/applications/%{srcname}.desktop %post /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-desktop-database &> /dev/null || : %postun if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi /usr/bin/update-desktop-database &> /dev/null || : %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -n python3-%{srcname} %doc doc/_build/html %{srcname}/contributors.txt README.md RELEASE_NOTES.md %license %{srcname}/license.txt %{_bindir}/%{srcname} %{_datadir}/appdata/%{srcname}.appdata.xml %{_datadir}/applications/%{srcname}.desktop %{_datadir}/icons/hicolor/*/apps/%{srcname}.png %{_mandir}/man1/%{srcname}.1.gz %{python3_sitelib}/%{srcname}/ %{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/ %changelog * Fri Dec 23 2016 Scott K Logan - 4.3.1-1 - Initial package