Jon Ciesla 036e24f
%if 0%{?fedora} > 12 || 0%{?rhel} > 6
0b45862
%global with_python3 1
Jon Ciesla 036e24f
%endif
Jon Ciesla 036e24f
Jon Ciesla 036e24f
# Re-enable Python 3 support once the following are resolved:
Jon Ciesla 036e24f
# https://github.com/mitsuhiko/logbook/issues/42
Jon Ciesla 036e24f
# https://github.com/mitsuhiko/logbook/issues/43
Jon Ciesla 036e24f
Jon Ciesla 036e24f
# we don't want to provide private python extension libs
Jon Ciesla 036e24f
%{?filter_setup:
43f1c1e
%filter_provides_in %{python2_sitearch}/.*\.so$
43f1c1e
%filter_provides_in %{python3_sitearch}/.*\.so$
Jon Ciesla 036e24f
%filter_setup
Jon Ciesla 036e24f
}
Jon Ciesla 036e24f
Jon Ciesla 036e24f
Name:		python-logbook
43f1c1e
Version:	0.11.3
36d9057
Release:	3%{?dist}
Jon Ciesla 036e24f
Summary:	A logging replacement for Python
Jon Ciesla 036e24f
Jon Ciesla 036e24f
Group:		Development/Libraries
Jon Ciesla 036e24f
License:	BSD
Jon Ciesla 036e24f
URL:		http://pypi.python.org/pypi/Logbook/
Jon Ciesla 036e24f
Source0:	http://pypi.python.org/packages/source/L/Logbook/Logbook-%{version}.tar.gz
Jon Ciesla 036e24f
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Jon Ciesla 036e24f
43f1c1e
BuildRequires:	python2-devel pytest
Jon Ciesla 036e24f
BuildRequires:	python-sqlalchemy python-zmq python-execnet python-jinja2
Jon Ciesla 036e24f
%if 0%{?with_python3}
43f1c1e
BuildRequires:	python3-devel python3-pytest
Jon Ciesla 036e24f
BuildRequires:	python3-setuptools
Jon Ciesla 036e24f
BuildRequires:	python3-sqlalchemy python3-zmq
Jon Ciesla 036e24f
%endif
Jon Ciesla 036e24f
BuildRequires:	python-setuptools
Jon Ciesla 036e24f
Jon Ciesla 036e24f
%description
Jon Ciesla 036e24f
Logbook is a logging system for Python that replaces the standard library’s
Jon Ciesla 036e24f
logging module. It was designed with both complex and simple applications
Jon Ciesla 036e24f
and mind and the idea to make logging fun. What makes it fun? What about 
Jon Ciesla 036e24f
getting log messages on your phone or desktop notification system? 
Jon Ciesla 036e24f
Logbook can do that.
Jon Ciesla 036e24f
Jon Ciesla 036e24f
Jon Ciesla 036e24f
%if 0%{?with_python3}
Jon Ciesla 036e24f
%package -n python3-logbook
Jon Ciesla 036e24f
Summary:	A logging replacement for Python 3
Jon Ciesla 036e24f
Group:		Development/Libraries
Jon Ciesla 036e24f
Jon Ciesla 036e24f
%description -n python3-logbook
Jon Ciesla 036e24f
Logbook is a logging system for Python that replaces the standard library’s
Jon Ciesla 036e24f
logging module. It was designed with both complex and simple applications
Jon Ciesla 036e24f
and mind and the idea to make logging fun. What makes it fun? What about 
Jon Ciesla 036e24f
getting log messages on your phone or desktop notification system? 
Jon Ciesla 036e24f
Logbook can do that.
Jon Ciesla 036e24f
Jon Ciesla 036e24f
This package allows for use of logger with Python 3.
Jon Ciesla 036e24f
%endif # with_python3
Jon Ciesla 036e24f
Jon Ciesla 036e24f
%prep
Jon Ciesla 036e24f
%setup -qn Logbook-%{version}
Jon Ciesla 036e24f
Jon Ciesla 036e24f
Jon Ciesla 036e24f
%if 0%{?with_python3}
Jon Ciesla 036e24f
rm -rf %{py3dir}
Jon Ciesla 036e24f
cp -a . %{py3dir}
Jon Ciesla 036e24f
%endif # with_python3
Jon Ciesla 036e24f
Jon Ciesla 036e24f
%build
43f1c1e
CFLAGS="$RPM_OPT_FLAGS" %{__python2} setup.py build
Jon Ciesla 036e24f
Jon Ciesla 036e24f
%if 0%{?with_python3}
Jon Ciesla 036e24f
pushd %{py3dir}
Jon Ciesla 036e24f
CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
Jon Ciesla 036e24f
popd
Jon Ciesla 036e24f
%endif # with_python3
Jon Ciesla 036e24f
Jon Ciesla 036e24f
%install
Jon Ciesla 036e24f
rm -rf %{buildroot}
Jon Ciesla 036e24f
# Must do the python3 install first because the scripts in /usr/bin are
Jon Ciesla 036e24f
# overwritten with every setup.py install (and we want the python2 version
Jon Ciesla 036e24f
# to be the default for now).
Jon Ciesla 036e24f
%if 0%{?with_python3}
Jon Ciesla 036e24f
pushd %{py3dir}
Jon Ciesla 036e24f
%{__python3} setup.py install --skip-build --root %{buildroot}
Jon Ciesla 036e24f
popd
Jon Ciesla 036e24f
%endif # with_python3
Jon Ciesla 036e24f
43f1c1e
%{__python2} setup.py install --skip-build --root %{buildroot} \
Jon Ciesla 036e24f
	--install-data=%{_datadir}
Jon Ciesla 036e24f
Jon Ciesla 036e24f
%check
Jon Ciesla 036e24f
%{__python} setup.py test
Jon Ciesla 036e24f
%if 0%{?with_python3}
Jon Ciesla 036e24f
pushd %{py3dir}
Jon Ciesla 036e24f
%{__python3} setup.py test
Jon Ciesla 036e24f
popd
Jon Ciesla 036e24f
%endif # with_python3
Jon Ciesla 036e24f
Jon Ciesla 036e24f
Jon Ciesla 036e24f
%clean
Jon Ciesla 036e24f
rm -rf %{buildroot}
Jon Ciesla 036e24f
Jon Ciesla 036e24f
Jon Ciesla 036e24f
%files
Jon Ciesla 036e24f
%defattr(-,root,root,-)
051df58
%doc CHANGES
43f1c1e
%{python2_sitearch}/logbook*
43f1c1e
#%%exclude %%{python2_sitearch}/logbook/testsuite
43f1c1e
%{python2_sitearch}/Logbook-%{version}-py2.7.egg-info/
Jon Ciesla 036e24f
Jon Ciesla 036e24f
%if 0%{?with_python3}
Jon Ciesla 036e24f
%files -n python3-logbook
Jon Ciesla 036e24f
%defattr(-,root,root,-)
051df58
%doc CHANGES
43f1c1e
%{python3_sitearch}/logbook*
43f1c1e
#%%exclude %%{python3_sitearch}/logbook/testsuite
43f1c1e
%{python3_sitearch}/Logbook-%{version}-py%{python3_version}.egg-info/
Jon Ciesla 036e24f
%endif
Jon Ciesla 036e24f
Jon Ciesla 036e24f
%changelog
36d9057
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11.3-3
36d9057
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
36d9057
5ea9977
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.3-2
5ea9977
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5ea9977
43f1c1e
* Thu Nov 19 2015 Jon Ciesla <limburgher@gmail.com> - 0.11.3-1
43f1c1e
- Latest upstream.
43f1c1e
- Fix Python 3 build.
43f1c1e
- Moved from noarch to arched.
43f1c1e
5041032
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-3
5041032
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
5041032
7ccbbff
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-2
7ccbbff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7ccbbff
bcaab73
* Thu Oct 02 2014 Jon Ciesla <limburgher@gmail.com> - 0.7.0-1
bcaab73
- Latest upstream, BZ 1148946.
bcaab73
a3da133
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-3
a3da133
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a3da133
9a3d41d
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.6.0-2
9a3d41d
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
9a3d41d
0b45862
* Mon Nov 11 2013 Jon Ciesla <limburgher@gmail.com> - 0.6.0-1
0b45862
- Latest upstream.
0b45862
- Re-enable Python 3, 1028774.
0b45862
051df58
* Fri Sep 13 2013 Jon Ciesla <limburgher@gmail.com> - 0.5.0-1
051df58
- Latest upstream.
051df58
- Switched to noarch.
051df58
8850217
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-2
8850217
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
8850217
051df58
* Mon Jan 28 2013 Jon Ciesla <limburgher@gmail.com> - 0.4.1-1
9337c6b
- Latest upstream, BZ 904886.
9337c6b
5551f8f
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-5
5551f8f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
5551f8f
e835cb7
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-4
e835cb7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e835cb7
Jon Ciesla 036e24f
* Fri Oct 28 2011 Jon Ciesla <limb@jcomserv.net> - 0.3-3
Jon Ciesla 036e24f
- Dropped test suite from Python 3 package.
Jon Ciesla 036e24f
- Testing via setuptools.
Jon Ciesla 036e24f
- Filtered .so in Python 3 package.
Jon Ciesla 036e24f
- Dropped Python 3 subpackage, see comments.
Jon Ciesla 036e24f
- Added python-jinja2 BR.
Jon Ciesla 036e24f
Jon Ciesla 036e24f
* Wed Oct 26 2011 Jon Ciesla <limb@jcomserv.net> - 0.3-2
Jon Ciesla 036e24f
- Ownership and macro fixes.
Jon Ciesla 036e24f
- Dropped spurious Requires.
Jon Ciesla 036e24f
- Added test suite to check, dropped from package.
Jon Ciesla 036e24f
Jon Ciesla 036e24f
* Tue Oct 11 2011 Jon Ciesla <limb@jcomserv.net> - 0.3-1
Jon Ciesla 036e24f
- Initial RPM release