Accepting request 184852 from home:frispete:python

- generate documentation in separate -doc file
- enable tests (run tests on source tree)

OBS-URL: https://build.opensuse.org/request/show/184852
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zope.exceptions?expand=0&rev=3
This commit is contained in:
Sascha Peilicke 2013-07-30 10:21:42 +00:00 committed by Git OBS Bridge
parent 1f4c868454
commit b781aa51b8
2 changed files with 34 additions and 8 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jul 29 14:04:41 UTC 2013 - hpj@urpla.net
- generate documentation in separate -doc file
- enable tests (run tests on source tree)
-------------------------------------------------------------------
Fri Mar 15 14:01:12 UTC 2013 - speilicke@suse.com

View File

@ -13,22 +13,27 @@
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python-zope.exceptions
Version: 4.0.6
Release: 0
License: ZPL-2.1
Summary: Zope Exceptions
Url: http://cheeseshop.python.org/pypi/zope.exceptions
License: ZPL-2.1
Group: Development/Languages/Python
Url: http://cheeseshop.python.org/pypi/zope.exceptions
Source: http://pypi.python.org/packages/source/z/zope.exceptions/zope.exceptions-%{version}.zip
BuildRequires: python-devel
BuildRequires: python-distribute
BuildRequires: unzip
# Documentation requirements:
BuildRequires: python-Sphinx
BuildRequires: python-repoze.sphinx.autointerface
# Test requirements:
#BuildRequires: python-zope.interface
#BuildRequires: python-zope.testrunner
BuildRequires: python-six
BuildRequires: python-zope.interface
BuildRequires: python-zope.testrunner
Requires: python-zope.interface
Requires: python-zope.testrunner
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -42,22 +47,37 @@ BuildArch: noarch
This package contains exception interfaces and implementations which are so
general purpose that they don't belong in Zope application-specific packages.
%package doc
Summary: Zope Exceptions
Group: Development/Languages/Python
Requires: %{name} = %{version}
%description doc
This package contains documentation files for %{name}.
%prep
%setup -q -n zope.exceptions-%{version}
%build
python setup.py build
PYTHONPATH=$(pwd)/build/lib python setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
#NOTE(saschpe): Tests are self-referential, i.e. move to sperarate spec file:
#%%check
#python setup.py test
#NOTE(saschpe): Tests are self-referential, i.e. move to sperarate spec file
#NOTE(frispete): run tests against source in order to avoid the need for an
# external test package
%check
PYTHONPATH=$(pwd)/src python setup.py test
%files
%defattr(-,root,root,-)
%doc COPYRIGHT.txt LICENSE.txt README.rst
%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
%{python_sitelib}/*
%files doc
%defattr(-,root,root,-)
%doc build/sphinx/html/
%changelog