Blob Blame Raw
%{!?__python2: %global __python2 %{__python}}
%if 0%{?fedora} > 12
%global with_python3 1
%else
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
%endif

Name:           python-raven

Version:        5.12.0
Release:        1%{?dist}
Summary:        Python client for Sentry

Group:          Development/Libraries
License:        BSD
URL:            https://pypi.python.org/pypi/raven/
Source0:        http://pypi.python.org/packages/source/r/raven/raven-%{version}.tar.gz
Patch0:         raven-use-system-cacert.patch
BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python-setuptools
#needed for check:
#BuildRequires:  python-contextlib2
#BuildRequires:  python-webpy
#BuildRequires:  python-paste
#BuildRequires:  python-unittest2
#BuildRequires:  python-flask-login
#BuildRequires:  python-blinker
#BuildRequires:  python-anyjson
#BuildRequires:  python-webtest
#BuildRequires:  python-tornado
#BuildRequires:  python-requests
#BuildRequires:  python-pytest

Requires: python-contextlib2

%if 0%{?with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
#needed for check:
#BuildRequires:  python-contextlib2
#BuildRequires:  python3-flask-login
#BuildRequires:  python3-blinker
#BuildRequires:  python3-anyjson
#BuildRequires:  python3-webtest
#BuildRequires:  python3-tornado
#BuildRequires:  python3-requests
#BuildRequires:  python3-pytest
%endif # with_python3

%description
Raven is a Python client for Sentry <http://getsentry.com>. It provides full
out-of-the-box support for many of the popular frameworks, including Django,
and Flask. Raven also includes drop-in support for any WSGI-compatible web
application.

%if 0%{?with_python3}
%package -n python3-raven
Summary:        Python client for Sentry
Group:          Development/Libraries

%description -n python3-raven
Raven is a Python client for Sentry <http://getsentry.com>. It provides full
out-of-the-box support for many of the popular frameworks, including Django,
and Flask. Raven also includes drop-in support for any WSGI-compatible web
application.
%endif # with_python3

%prep
%setup -q -n raven-%{version}
%patch0 -p1

rm raven/data/cacert.pem
rmdir raven/data
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif # with_python3

%build
%{__python2} setup.py build

%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif # with_python3

%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root=%{buildroot}
mv %{buildroot}/%{_bindir}/raven %{buildroot}/%{_bindir}/python3-raven
popd
%endif # with_python3

%{__python2} setup.py install --skip-build --root=%{buildroot}

%check
#Disable check for now because of missing dependency pytest-timeout
#%%{__python2} setup.py test
#%%if 0%%{?with_python3}
#pushd %%{py3dir}
#%%{__python3} setup.py test
#popd
#%%endif

%files
%doc README.rst
%license LICENSE
%{_bindir}/raven
%{python2_sitelib}/*

%if 0%{?with_python3}
%files -n python3-raven
%doc README.rst
%license LICENSE
%{_bindir}/python3-raven
%{python3_sitelib}/*
%endif # with_python3

%changelog
* Wed Mar 30 2016 Sander Hoentjen <sander@hoentjen.eu> 5.12.0-1
- Update to 5.12.0 (#1313113)

* Sun Mar 27 2016 Sander Hoentjen <sander@hoentjen.eu> 5.11.2-1
- Update to 5.11.2 (#1313113)

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.10.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Tue Feb 02 2016 Sander Hoentjen <sander@hoentjen.eu> - 5.10.2-2
- add requires on python-contextlib2

* Thu Jan 28 2016 Sander Hoentjen <sander@hoentjen.eu> - 5.10.2-1
- Update to 5.10.2 (#1298402)

* Fri Jan 22 2016 Sander Hoentjen <sander@hoentjen.eu> - 5.10.1-1
- Update to 5.10.1 (#1298402)

* Sat Jan 16 2016 Sander Hoentjen <sander@hoentjen.eu> - 5.10.0-1
- Update to 5.10.0 (#1298402)
- Use %%license tag for LICENSE
- Use system cacerts
- add check section but disabled for now, because of missing pytest-timeout dependency

* Fri Jan 08 2016 Sander Hoentjen <sander@hoentjen.eu> - 5.9.2-1
- Update to new upstream release 5.9.2
- Define __python2 if it's undefined (EPEL6 compatibility) <ewoud@kohlvanwijngaarden.nl>
- Correctly define python2_sitelib macro if it's undefined <ewoud@kohlvanwijngaarden.nl>

* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 4.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4

* Wed Apr 02 2014 Xavier Queralt <xqueralt@redhat.com> - 4.1.1-1
- Update to new upstream release 4.1.1

* Tue Jan 21 2014 Xavier Queralt <xqueralt@redhat.com> - 4.0.3-1
- Update to new upstream release 4.0.3

* Wed Oct 16 2013 Xavier Queralt <xqueralt@redhat.com> - 3.5.0-2
- Don't build python3 package in RHEL
- Define the python2_sitelib macro if it is not defined

* Tue Oct 15 2013 Xavier Queralt <xqueralt@redhat.com> - 3.5.0-1
- initial package