Blob Blame Raw
Name:           systemd-coredump-python
Version:        2
Release:        7%{?dist}
Summary:        systemd-coredump helper to log Python exceptions

License:        GPLv2+
URL:            https://github.com/systemd/systemd-coredump-python
Source0:        https://github.com/systemd/systemd-coredump-python/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch1:         0001-In-demo-mode-do-not-install-handler-manually.patch

BuildRequires:  python2-devel
BuildRequires:  python3-devel

BuildArch:      noarch

%global _description \
Python module which hooks into the sys.excepthook to log backtraces \
in the journal.

%description %_description

%package -n python2-systemd-coredump
Summary:        %{summary}
Conflicts:      systemd < 233

%{?python_provide:%python_provide python2-systemd-coredump}

%description -n python2-systemd-coredump %_description

%package -n python3-systemd-coredump
Summary:        %{summary}
Conflicts:      systemd < 233

%{?python_provide:%python_provide python3-systemd-coredump}

%description -n python3-systemd-coredump %_description

%prep
%autosetup -p1

# I messed that up, it'll be fixed in next release, pinky promise
sed -i "s/'1'/'2'/" setup.py

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

# %%check
# there are no useful checks, the stuff in tests/ is only useful for development so far

%files -n python2-systemd-coredump
%license COPYING
%doc README
%{python2_sitelib}/systemd_coredump_exception_handler.py*
%{python2_sitelib}/systemd_coredump.pth
%{python2_sitelib}/systemd_coredump_python-%{version}-py%{python2_version}.egg-info

%files -n python3-systemd-coredump
%license COPYING
%doc README
%{python3_sitelib}/systemd_coredump_exception_handler.py
%{python3_sitelib}/__pycache__/*
%{python3_sitelib}/systemd_coredump.pth
%{python3_sitelib}/systemd_coredump_python-%{version}-py%{python3_version}.egg-info

%changelog
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 2-5
- Rebuilt for Python 3.7

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Wed Mar 15 2017 zbyszek <zbyszek@in.waw.pl> - 2-2
- Add small patch to avoid logging the exception twice in demo mode

* Sun Mar  5 2017 zbyszek <zbyszek@in.waw.pl> - 2-1
- Initial packaging