f3ef205
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
5f65548
%global with_python3 1
f3ef205
2d6abc6
%define libreportver 2.0.18-1
7394e64
f3ef205
Summary:  A python library for handling exceptions
f3ef205
Name: python-meh
cfe69c4
Url: https://github.com/rhinstaller/python-meh
1eaedb5
Version: 0.43
Robert Kuska 1310ea4
Release: 2%{?dist}
f3ef205
# This is a Red Hat maintained package which is specific to
f3ef205
# our distribution.  Thus the source is only available from
f3ef205
# within this srpm.
f3ef205
# This tarball was created from upstream git:
cfe69c4
#   git clone https://github.com/rhinstaller/python-meh
f3ef205
#   cd python-meh && make archive
cfe69c4
Source0: https://github.com/rhinstaller/python-meh/archive/%{name}-%{version}.tar.gz
f3ef205
f3ef205
License: GPLv2+
f3ef205
Group: System Environment/Libraries
f3ef205
BuildArch: noarch
f3ef205
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
15055d7
BuildRequires: python-devel
15055d7
BuildRequires: gettext
15055d7
BuildRequires: python-setuptools
15055d7
BuildRequires: intltool
15055d7
BuildRequires: dbus-python
15055d7
BuildRequires: libreport-gtk >= %{libreportver}
15055d7
BuildRequires: libreport-cli >= %{libreportver}
15055d7
BuildRequires: libreport-python >= %{libreportver}
15055d7
BuildRequires: python-six
5f65548
5f65548
%if 0%{with_python3}
15055d7
BuildRequires: python3-devel
15055d7
BuildRequires: python3-setuptools
5f65548
BuildRequires: python3-dbus
5f65548
BuildRequires: libreport-python3 >= %{libreportver}
15055d7
BuildRequires: python3-six
5f65548
%endif
5f65548
15055d7
Requires: python
15055d7
Requires: dbus-python
b4d1c66
Requires: rpm-python
7e50b30
Requires: libreport-cli >= %{libreportver}
5f65548
Requires: libreport-python >= %{libreportver}
15055d7
Requires: python-six
f3ef205
f3ef205
%description
f3ef205
The python-meh package is a python library for handling, saving, and reporting
f3ef205
exceptions.
f3ef205
7e50b30
%package gui
7e50b30
Summary: Graphical user interface for the python-meh library
7e50b30
Requires: python-meh = %{version}-%{release}
15055d7
Requires: pygobject3
15055d7
Requires: gtk3
7e50b30
Requires: libreport-gtk >= %{libreportver}
7e50b30
7e50b30
%description gui
7e50b30
The python-meh-gui package provides a GUI for the python-meh library.
7e50b30
5f65548
%if 0%{with_python3}
5f65548
%package -n python3-meh
5f65548
Summary:  A python 3 library for handling exceptions
15055d7
Requires: python3
15055d7
Requires: python3-dbus
b4d1c66
Requires: rpm-python3
5f65548
Requires: libreport-cli >= %{libreportver}
5f65548
Requires: libreport-python3 >= %{libreportver}
15055d7
Requires: python3-six
5f65548
5f65548
%description -n python3-meh
5f65548
The python3-meh package is a python 3 library for handling, saving, and reporting
5f65548
exceptions.
5f65548
5f65548
%package -n python3-meh-gui
5f65548
Summary: Graphical user interface for the python3-meh library
5f65548
Requires: python3-meh = %{version}-%{release}
5f65548
Requires: python3-gobject, gtk3
5f65548
Requires: libreport-gtk >= %{libreportver}
5f65548
5f65548
%description -n python3-meh-gui
5f65548
The python3-meh-gui package provides a GUI for the python3-meh library.
5f65548
5f65548
%endif
5f65548
f3ef205
%prep
f3ef205
%setup -q
f3ef205
5f65548
%if 0%{?with_python3}
5f65548
rm -rf %{py3dir}
5f65548
cp -a . %{py3dir}
5f65548
%endif # with_python3
5f65548
f3ef205
%build
f3ef205
make
f3ef205
5f65548
%if 0%{?with_python3}
5f65548
pushd %{py3dir}
5f65548
make PYTHON=%{__python3}
5f65548
popd
5f65548
%endif
5f65548
7394e64
%check
7394e64
make test
7394e64
5f65548
%if 0%{?with_python3}
5f65548
pushd %{py3dir}
5f65548
# Needs UTF-8 locale
5f65548
LANG=en_US.UTF-8 make PYTHON=%{__python3} test
5f65548
popd
5f65548
%endif
5f65548
f3ef205
%install
f3ef205
rm -rf %{buildroot}
f3ef205
make DESTDIR=%{buildroot} install
5f65548
5f65548
%if 0%{?with_python3}
5f65548
pushd %{py3dir}
5f65548
make PYTHON=%{__python3} DESTDIR=%{buildroot} install
5f65548
popd
5f65548
%endif
5f65548
381c940
%find_lang %{name}
f3ef205
f3ef205
%clean
f3ef205
rm -rf %{buildroot}
f3ef205
381c940
%files -f %{name}.lang
f3ef205
%defattr(-,root,root,-)
f3ef205
%doc ChangeLog COPYING
f3ef205
%{python_sitelib}/*
b24880d
%exclude %{python_sitelib}/meh/ui/gui.py*
7e50b30
7e50b30
%files gui
b24880d
%{python_sitelib}/meh/ui/gui.py*
f3ef205
%{_datadir}/python-meh
f3ef205
5f65548
%files -n python3-meh
5f65548
%doc ChangeLog COPYING
5f65548
%{python3_sitelib}/*
5f65548
%exclude %{python3_sitelib}/meh/ui/gui.py*
5f65548
5f65548
%files -n python3-meh-gui
5f65548
%{python3_sitelib}/meh/ui/gui.py*
5f65548
%{_datadir}/python-meh
5f65548
f3ef205
%changelog
Robert Kuska 1310ea4
* Thu Nov 05 2015 Robert Kuska <rkuska@redhat.com> - 0.43-2
Robert Kuska 1310ea4
- Rebuilt for Python3.5 rebuild
Robert Kuska 1310ea4
- Remove requires for python3-pocketlint
Robert Kuska 1310ea4
1eaedb5
* Mon Oct 05 2015 Martin Kolman <mkolman@redhat.com> - 0.43-1
1eaedb5
- Set translations domain for glade files (vtrefny)
1eaedb5
5731a07
* Tue Sep 29 2015 Martin Kolman <mkolman@redhat.com> - 0.42-1
5731a07
- Add tests and ChangeLog to MANIFEST.in (vtrefny)
5731a07
- Fix clicking on buttons on error pop-up doesn't work (#1250942) (vtrefny)
5731a07
- Add Makefile to MANIFEST.in (vtrefny)
5731a07
- Add archive target to Makefile (vtrefny)
5731a07
- Add .gitignore (vtrefny)
5731a07
ac7f1f2
* Wed Sep 16 2015 Martin Kolman <mkolman@redhat.com> - 0.41-1
ac7f1f2
- Make sure the Meh window has focus even if a dialog is displayed (mkolman)
ac7f1f2
- Run pylint as part of "make ci". (clumens)
ac7f1f2
- Add a new makefile target that does everything needed for jenkins. (clumens)
ac7f1f2
- Fix the other pylint-discovered errors. (clumens)
ac7f1f2
- Use isinstance instead of type. (clumens)
ac7f1f2
- Fix all the places we're redefining something. (clumens)
ac7f1f2
- Don't use [] as the default argument in a method. (clumens)
ac7f1f2
- Take care of exception-related pylint messages. (clumens)
ac7f1f2
- Get rid of all the unused variable warnings. (clumens)
ac7f1f2
- Get rid of all unused and wildcard imports. (clumens)
ac7f1f2
- Add pocketlint support to python-meh. (clumens)
ac7f1f2
- Use gi.require_version for Gtk import (vtrefny)
ac7f1f2
cfe69c4
* Tue Apr 28 2015 Martin Kolman <mkolman@redhat.com> - 0.40-1
cfe69c4
- Make sure the date in RPM changelog is always in English (mkolman)
cfe69c4
- Update upstream URL (mkolman)
cfe69c4
3e10772
* Wed Apr 01 2015 Martin Kolman <mkolman@redhat.com> - 0.39-1
3e10772
- Handle LANG=C (mkolman)
3e10772
15055d7
* Tue Mar 31 2015 Martin Kolman <mkolman@redhat.com> - 0.38-1
15055d7
- Switch to Zanata for translations (mkolman)
15055d7
- Run both Python 2 and Python 3 tests for "make test" (mkolman)
15055d7
- Python 3 compatibility fixes for the Unicode test (mkolman)
15055d7
- Make it possible to specify file open mode (mkolman)
15055d7
- Add missing six dependency (mkolman)
15055d7
- Fix date in changelog (mkolman)
15055d7
b4d1c66
* Fri Mar 27 2015 Martin Kolman <mkolman@redhat.com> - 0.37-1
b4d1c66
- Fix dumping file attachments in Python 3 (vtrefny)
b4d1c66
- meh has not required openssh-clients since 2009 (awilliam)
b4d1c66
ad89a2e
* Thu Mar 05 2015 Martin Kolman <mkolman@redhat.com> - 0.36-1
ad89a2e
- Package's epoch returned by RPM is an integer (#1199263) (vpodzime)
ad89a2e
9c2e156
* Tue Feb 17 2015 Martin Kolman <mkolman@redhat.com> - 0.35-1
9c2e156
- Add option to remove the 'Debug' option/button for mainExceptionWindow (vtrefny)
9c2e156
5f65548
* Tue Dec 09 2014 Vratislav Podzimek <vpodzime@redhat.com> - 0.34-1
5f65548
- Encode str/unicode object before hashing it (vpodzime)
5f65548
- Use dict.items() instead of dict.iteritems() (vpodzime)
5f65548
- Add one more flag to test (for Python3) (vpodzime)
5f65548
- Make sure we work with strings when we think we do (vpodzime)
5f65548
5f65548
* Fri Dec 05 2014 Vratislav Podzimek <vpodzime@redhat.com> - 0.33-1
5f65548
- Make sure fresh translations are always fetched (vpodzime)
5f65548
- Add pieces needed to build the python3- subpackage (#985294) (mhroncok)
5f65548
- Remove yum from requires and fix setuptools requires (mhroncok)
5f65548
- raw_input is replaced by input in Python3 (vpodzime)
5f65548
- Raise exception in a Python3 compatible way (mhroncok)
9c2e156
- Remove the --disable-overwrite parameter for the Transifex client (mkolman)
9c2e156
- Use /usr/bin/python2 in scripts (mkolman)
9c2e156
- Add example code using python-meh (vpodzime)
5f65548
1ca9bc6
* Mon Apr 28 2014 Martin Kolman <mkolman@redhat.com> - 0.32-1
1ca9bc6
- Translation update
1ca9bc6
82acffb
* Fri Mar 21 2014 Martin Kolman <mkolman@redhat.com> - 0.31-1
82acffb
- Translation update
82acffb
b24880d
* Wed Dec 18 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.30-1
b24880d
- Exclude compiled versions of gui.py from the non-gui package (dshea)
b24880d
- Skip callbacks providing no information (vpodzime)
b24880d
7e50b30
* Wed Nov 20 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.29-1
7e50b30
- Split GUI out into a separate package (vpodzime)
7e50b30
- Create archives in one Makefile target and reuse it (vpodzime)
7e50b30
444262a
* Tue Nov 05 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.28-1
444262a
- Introduce support for Python 3 while keeping Python 2 working (miro)
444262a
- Sync spec with downstream (vpodzime)
444262a
1297bae
* Wed Oct 09 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.27-1
1297bae
- Use join method instead of the joinfields function
1297bae
- Translate the hints on how to quit debugger and shell
1297bae
- Add a way to run shell when exception appears
1297bae
- Get rid of constants that are no longer used anywhere
1297bae
- Filter local variables in a nicer way and fix docstring
1297bae
abe8a16
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.26-2
abe8a16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
abe8a16
a2fb72d
* Tue Jul 23 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.26-1
a2fb72d
- Output binary data correctly as hexa strings (#986515) (vpodzime)
a2fb72d
- Add newline before dumping callbacks' outputs (vpodzime)
a2fb72d
c8ed471
* Tue Jun 18 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.25-1
c8ed471
- Add and use the safe_string module and the SafeStr class (vpodzime)
c8ed471
- Give translators hint about the cryptic strings (vpodzime)
c8ed471
56e3090
* Thu May 02 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.24-1
56e3090
- Epoch of the package from RPM db can be None (#957789) (vpodzime)
56e3090
dd4a051
* Wed Apr 17 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.23-1
dd4a051
- Use Sphinx syntax for docstrings (vpodzime)
dd4a051
- Allow a change of the I/O functions (vpodzime)
dd4a051
- Reword the 'Debug' button warning (#948256) (vpodzime)
dd4a051
c16e6b3
* Thu Apr 04 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.22-1
c16e6b3
- Some more stuff for ABRT/libreport (#929181) (vpodzime)
c16e6b3
- Tell ABRT we are reporting a Python excetion (vpodzime)
c16e6b3
- Use named tuples instead of our magic tuples (vpodzime)
c16e6b3
2be22be
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21-2
2be22be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2be22be
2d6abc6
* Mon Jan 21 2013 Vratislav Podzimek <vpodzime@redhat.com> - 0.21-1
2d6abc6
- New purely textual text interface (vpodzime)
2d6abc6
- Add dumb enableNetwork implementation to GraphicalIntf (vpodzime)
2d6abc6
- Destroy main window after running it (vpodzime)
2d6abc6
- Get rid of the accountManager and use new libreport API (vpodzime)
2d6abc6
- Add a way to override previously registered callback (vpodzime)
2d6abc6
- Allow callbacks marked as attachment only (vpodzime)
2d6abc6
- Add support for callbacks providing additional data (vpodzime)
2d6abc6
e9df55b
* Tue Dec 11 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.20-1
e9df55b
- Handle non-ascii dict keys and values correctly (#883641) (vpodzime)
e9df55b
7394e64
* Wed Nov 14 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.19-1
7394e64
- Add test for handling unicode strings and files (vpodzime)
7394e64
- Read files as UTF-8 and ignore errors (#874250) (vpodzime)
7394e64
- Add %check section to the spec file (vpodzime)
7394e64
- Fix tests (vpodzime)
7394e64
355afd2
* Thu Oct 25 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.18-1
355afd2
- Handle tracebacks with no stack (#866441) (vpodzime)
355afd2
- Parse component name correctly (#866526) (vpodzime)
355afd2
- Spelling corrections (#865993) (vpodzime)
355afd2
82f5ff7
* Tue Oct 09 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.17-1
82f5ff7
- Handle unicode strings correctly (#854959) (vpodzime)
82f5ff7
e9a37eb
* Tue Sep 11 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.16-1
e9a37eb
- Do not overwrite process information with files having the same basename (vpodzime)
e9a37eb
- Encode dump as utf-8 before writing to file (#854959) (vpodzime)
e9a37eb
98f6135
* Mon Aug 20 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.15-1
98f6135
- Add main_window property to the MainExceptionWindow (vpodzime)
98f6135
- Don't try to dump objects without __dict__ (vpodzime)
98f6135
- Change require from rpm to rpm-python (vpodzime)
98f6135
a1a63f7
* Fri Aug 03 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.14-1
a1a63f7
- Use just a basename of the attached file as the item name (vpodzime)
a1a63f7
- Set the type hint for the mainExceptionWindow to Dialog (vpodzime)
a1a63f7
- Store and then write out the string representation of the traceback and object dump (vpodzime)
a1a63f7
b24880d
* Fri Jul 27 2012 Vratislav Podzimek <vpodzime@redhat.com> - 0.13-1
2c9997f
- Add files specified in the Config object as attachments to bugreports (vpodzime)
2c9997f
- Display hint how to quit the debugger (vpodzime)
2c9997f
- Do not kill the process when 'continue' is used in pdb (vpodzime)
2c9997f
- Port to Gtk3 and the new design (vpodzime)
2c9997f
- Remove the rc attribute and getrc methods (vpodzime)
2c9997f
- Fix 'all' and 'install' Makefile targets (vpodzime)
2c9997f
- Migrate l10n to Transifex (vpodzime)
2c9997f
f41a852
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12-2
f41a852
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f41a852
c071e67
* Tue Dec 20 2011 Vratislav Podzimek <vpodzime@redhat.com> 0.12
c071e67
- Use new libreport API to get more information to bugzilla (vpodzime).
c071e67
- Adapt to the new API of libreport (vpodzime).
c071e67
- Move "import rpm" to where it's needed to avoid nameserver problems (clumens).
c071e67
  Resolves: rhbz#749330
c071e67
- Change dependency to libreport-* (mtoman).
c071e67
  Resolves: rhbz#730924
c071e67
- Add abrt-like information to bug reports (vpodzime).
c071e67
  Resolves: rhbz#728871
c071e67
- Propagate the screen attr when using text mode (jmoskovc).
c071e67
59181eb
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-2
59181eb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
59181eb
1511568
* Tue Jan 25 2011 Chris Lumens <clumens@redhat.com> - 0.11-1
1511568
- Update the spec file URL to something valid (#670601). (clumens)
1511568
- Don't use _D for Debug, since that's already used by the expander (#640929). (clumens)
1511568
- Translation updates.
9c1d6c1
2517811
* Tue Jun 22 2010 Chris Lumens <clumens@redhat.com> 0.10-1
2517811
- Treat classes like simple types, too. (clumens)
2517811
56b3c09
* Thu Jun 10 2010 Chris Lumens <clumens@redhat.com> - 0.9-1
56b3c09
- Remove the requirement on python-bugzilla (#602794). (clumens)
56b3c09
- Rename ba.po -> bs.po (#583055). (clumens)
56b3c09
- Translation updates.
56b3c09
6b23dea
* Thu Mar 04 2010 Chris Lumens <clumens@redhat.com> - 0.8-1
6b23dea
- And add a requirement for report as well. (clumens)
6b23dea
- filer.py is now completely taken over by meh. (clumens)
6b23dea
- Everything from savers.py has moved into report. (clumens)
6b23dea
- Remove unused UI code now that report handles all this for me. (clumens)
6b23dea
- Switch ExceptionHandler to use report (#562656). (clumens)
6b23dea
- Don't allow an exception when writing out an attribute stop the whole dump. (clumens)
6b23dea
- Credit where credit is due. (clumens)
6b23dea
38e51b8
* Tue Nov 03 2009 Chris Lumens <clumens@redhat.com> - 0.7-1
38e51b8
- Add a test case framework.
38e51b8
- Move src -> meh for ease of test case writing.
38e51b8
- Another attempt at making the attrSkipList work (#532612, #532737).
38e51b8
c1631dc
* Thu Oct 08 2009 Chris Lumens <clumens@redhat.com> - 0.6-1
c1631dc
- Make idSkipList work again.
c1631dc
- Support dumping objects derived from Python's object.
c1631dc
- Use the right method to set text on a snack.Entry (#526884).
c1631dc
8516f83
* Tue Sep 29 2009 Chris Lumens <clumens@redhat.com> - 0.5-1
8516f83
- Always compare version numbers as strings (#526188).
8516f83
c2681c4
* Fri Sep 25 2009 Chris Lumens <clumens@redhat.com> - 0.4-1
c2681c4
- Add a default description to bug reports.
c2681c4
- Handle the user pressing Escape by continuing to show the dialog.
c2681c4
- Lots more translation updates.
c2681c4
d7ef7ca
* Thu Sep 10 2009 Chris Lumens <clumens@redhat.com> - 0.3-1
d7ef7ca
- Pull in lots of new translations (#522410).
d7ef7ca
381c940
* Wed Aug 19 2009 Chris Lumens <clumens@redhat.com> - 0.2-1
381c940
- Add a title to the main exception dialog so it looks right in anaconda.
381c940
- Don't include an extra '/' in the displayed bug URL (#517515).
381c940
- Now that there's .po files, package them.
381c940
- Use the new exception icon (#517164).
381c940
f3ef205
* Tue Jul 28 2009 Chris Lumens <clumens@redhat.com> - 0.1-1
f3ef205
- Initial package.