- Cleanup spec file

- Install HTML documentation

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-testtools?expand=0&rev=7
This commit is contained in:
Sascha Peilicke 2012-12-06 11:02:18 +00:00 committed by Git OBS Bridge
parent ac4cf482c2
commit 1fb7aa8762
2 changed files with 18 additions and 24 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Dec 6 11:00:37 UTC 2012 - saschpe@suse.de
- Cleanup spec file
- Install HTML documentation
-------------------------------------------------------------------
Tue Nov 13 22:06:50 UTC 2012 - jfunk@funktronics.ca

View File

@ -15,28 +15,22 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define mod_name testtools
Name: python-%{mod_name}
Name: python-testtools
Version: 0.9.21
Release: 0
License: MIT
Summary: Extensions to the Python Standard Library Unit Testing Framework
Url: https://launchpad.net/testtools
Group: Development/Languages/Python
Source: %{mod_name}-%{version}.tar.gz
Source: testtools-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-sphinx
BuildRequires: python-Sphinx
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
%py_requires
%if 0%{?suse_version} > 1110
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%endif
%description
testtools is a set of extensions to the Python standard library's unit testing
@ -45,27 +39,21 @@ with unit testing in Python and come from many different sources. testtools
also ports recent unittest changes all the way back to Python 2.4.
%prep
%setup -q -n %{mod_name}-%{version}
find -type f -name "*~" | xargs rm -f
%setup -q -n testtools-%{version}
%build
export CFLAGS="%{optflags}"
python setup.py build
cd doc
make html
%check
python setup.py test
cd doc && make html && rm _build/html/.buildinfo # Build HTML documentation
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%clean
rm -rf %{buildroot}
%check
python setup.py test
%files
%defattr(-,root,root,-)
%doc LICENSE NEWS README
%python_sitelib/%{mod_name}*
%doc LICENSE NEWS README doc/_build/html
%{python_sitelib}/testtools*
%changelog