Blob Blame Raw
# Can remove this when we no longer care about these releases
%if ! (0%{?fedora} >= 13 || 0%{?rhel} >= 6)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%endif

Name:           python-transaction
Version:        1.1.1
Release:        3%{?dist}
Summary:        Transaction management for Python

Group:          Development/Languages
License:        ZPLv2.1
URL:            http://pypi.python.org/pypi/transaction
Source0:        http://pypi.python.org/packages/source/t/transaction/transaction-%{version}.tar.gz
# Fix context manager interface, tests
# Upstreamed: https://bugs.launchpad.net/transaction/+bug/834821
Patch0:         python-transaction-1.1.1-context-manager.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch

BuildRequires:  python-devel
BuildRequires:  python-zope-interface
%if 0%{?rhel} || 0%{?fedora} >= 13
BuildRequires: python-setuptools
%else
BuildRequires: python-setuptools-devel
%endif
Requires:       python-zope-interface

%description
This package contains a generic transaction implementation for Python. It is
mainly used by the ZODB, though.


%prep
%setup -q -n transaction-%{version}
%patch0 -p1 -b .context-manager


%build
%{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT


%check
PYTHONPATH=$(pwd) %{__python} setup.py test

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README.txt LICENSE.txt COPYRIGHT.txt
%{python_sitelib}/transaction/
%{python_sitelib}/*.egg-info



%changelog
* Fri Aug 26 2011 Nils Philippsen <nils@redhat.com> - 1.1.1-3
- fix content manager interface

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Sep 30 2010 Luke Macken <lmacken@redhat.com> - 1.1.1-1
- Update to 1.1.1
- Run the test suite

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Thu Jun 10 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.1.0-1
- Update to upstream bugfix 1.1.0

* Thu Jan 28 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.0.0-2
- Correction to how the setuptools vs setuptools-devel BR

* Thu Jan 28 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 1.0.0-1
- Update to 1.0 final.  Few fixes for tests and build/install cleanliness.
  No code changes.
- Conditionalize portions of the spec that are only needed for older distro releases.

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.5.a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0-0.4.a1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Thu Dec 18 2008 Luke Macken <lmacken@redhat.com> - 1.0-0.3.a1
- Fix the license tag

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.0-0.2.a1
- Rebuild for Python 2.6

* Tue Oct 21 2008 Luke Macken <lmacken@redhat.com> - 1.0-0.1.a2
- Initial package