e28d941
%global modname zope.exceptions
e28d941
ef1c772
%if 0%{?fedora} > 12 || 0%{?rhel} > 6
ef1c772
%global with_python3 1
ef1c772
%endif
ef1c772
ef1c772
Summary:    Zope Exceptions
ef1c772
Name:       python-zope-exceptions
ef1c772
Version:    4.0.3
ef1c772
Release:    1%{?dist}
ef1c772
Source0:    http://pypi.python.org/packages/source/z/%{modname}/%{modname}-%{version}.zip
ef1c772
License:    ZPLv2.1
ef1c772
Group:      Development/Libraries
ef1c772
BuildArch:  noarch
ef1c772
URL:        http://pypi.python.org/pypi/zope.exceptions
ef1c772
ef1c772
BuildRequires:  python2-devel
ef1c772
BuildRequires:  python-setuptools
ef1c772
BuildRequires:  python-zope-interface
ef1c772
ef1c772
%if 0%{?with_python3}
ef1c772
BuildRequires:  python3-devel
ef1c772
BuildRequires:  python3-setuptools
ef1c772
BuildRequires:  python3-zope-interface
ef1c772
%endif
ef1c772
ef1c772
Requires:       python-zope-interface
e28d941
e28d941
%description
e28d941
This package contains exception interfaces and implementations which are so
e28d941
general purpose that they don't belong in Zope application-specific packages.
e28d941
ef1c772
%if 0%{?with_python3}
ef1c772
%package -n python3-zope-exceptions
ef1c772
Summary:    Zope Exceptions
ef1c772
Group:      Development/Libraries
ef1c772
ef1c772
Requires:   python3-zope-interface
ef1c772
ef1c772
%description -n python3-zope-exceptions
ef1c772
This package contains exception interfaces and implementations which are so
ef1c772
general purpose that they don't belong in Zope application-specific packages.
ef1c772
%endif
ef1c772
e28d941
%prep
e28d941
%setup -q -n %{modname}-%{version}
e28d941
ef1c772
rm -rf %{modname}.egg-info
ef1c772
ef1c772
%if 0%{?with_python3}
ef1c772
rm -rf %{py3dir}
ef1c772
cp -a . %{py3dir}
ef1c772
%endif
ef1c772
e28d941
%build
11ccda6
%{__python} setup.py build
ef1c772
%if 0%{?with_python3}
ef1c772
pushd %{py3dir}
ef1c772
%{__python3} setup.py build
ef1c772
popd
ef1c772
%endif
e28d941
e28d941
%install
ef1c772
%if 0%{?with_python3}
ef1c772
pushd %{py3dir}
ef1c772
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
ef1c772
popd
ef1c772
%endif
ef1c772
ef1c772
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
11ccda6
11ccda6
%check
11ccda6
%{__python} setup.py test
e28d941
ef1c772
%if 0%{?with_python3}
ef1c772
pushd %{py3dir}
ef1c772
%{__python3} setup.py test
ef1c772
popd
ef1c772
%endif
ef1c772
e28d941
%files
e28d941
%defattr(-,root,root,-)
e28d941
%doc LICENSE.txt CHANGES.txt README.txt COPYRIGHT.txt
e28d941
%{python_sitelib}/zope/exceptions/
11ccda6
# Co-own %%{python_sitelib}/zope/
dc4b443
%dir %{python_sitelib}/zope/
8e92eeb
%exclude %{python_sitelib}/zope/exceptions/tests/
e28d941
%{python_sitelib}/%{modname}-*.egg-info
e28d941
%{python_sitelib}/%{modname}-*-nspkg.pth
e28d941
ef1c772
%if 0%{?with_python3}
ef1c772
%files -n python3-zope-exceptions
ef1c772
%doc LICENSE.txt CHANGES.txt README.txt COPYRIGHT.txt
ef1c772
%{python3_sitelib}/zope/exceptions/
ef1c772
# Co-own %%{python3_sitelib}/zope/
ef1c772
%dir %{python3_sitelib}/zope/
ef1c772
%exclude %{python3_sitelib}/zope/exceptions/tests/
ef1c772
%{python3_sitelib}/%{modname}-*.egg-info
ef1c772
%{python3_sitelib}/%{modname}-*-nspkg.pth
ef1c772
%endif
ef1c772
e28d941
e28d941
%changelog
ef1c772
* Tue Dec 11 2012 Ralph Bean <rbean@redhat.com> - 4.0.3-1
ef1c772
- Latest upstream.
ef1c772
- Packaged a python3 subpackage.
ef1c772
- Made indentation consistent.
ef1c772
30e0201
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.1-9
30e0201
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
30e0201
5c42a31
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.1-8
5c42a31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
5c42a31
bd6336d
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.6.1-7
bd6336d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
bd6336d
8e92eeb
* Sun Sep 19 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.6.1-6
8e92eeb
- Exclude the tests from installation
8e92eeb
11ccda6
* Wed Sep 15 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.6.1-5
11ccda6
- BR: python-zope-interface added
11ccda6
- Add %%check section and run the tests
11ccda6
dc4b443
* Tue Aug 31 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.6.1-4
dc4b443
- Own %%{python_sitelib}/zope/
dc4b443
e28d941
* Mon Aug 30 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.6.1-3
e28d941
- Remove python-zope-filesystem from requirements
e28d941
- Import to Fedora repositories
e28d941
e28d941
* Mon Aug 30 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.6.1-2
e28d941
- Remove %%clean section
e28d941
- Remove python-setuptools from requirements
e28d941
- Remove definitions of Python-related macros 
e28d941
e28d941
* Mon Aug 30 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.6.1-1
e28d941
- Update to 3.6.1
e28d941
- Summit review request
e28d941
e28d941
* Wed Jun 16 2010 Robin Lee <robinlee.sysu@gmail.com> - 3.6.0-1
e28d941
- Initial packaging