forked from pool/python-testtools
Accepting request 486868 from home:TheBlackCat:branches:devel:languages:python
+- Split documentation and tests into separate .spec file to avoid dependency cycle with python-extras/python-testrepositories. OBS-URL: https://build.opensuse.org/request/show/486868 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-testtools?expand=0&rev=43
This commit is contained in:
@@ -16,10 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
# A build cycle exists between python-extras and python-testtools. Thus, only
|
||||
# enable testing with a build conditional (off by default):
|
||||
%bcond_with tests
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-testtools
|
||||
Version: 2.2.0
|
||||
@@ -29,15 +25,12 @@ License: MIT
|
||||
Group: Development/Languages/Python
|
||||
Url: https://launchpad.net/testtools
|
||||
Source: https://pypi.io/packages/source/t/testtools/testtools-%{version}.tar.gz
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module extras >= 1.0.0}
|
||||
# Test requirement
|
||||
BuildRequires: %{python_module testscenarios}
|
||||
BuildRequires: %{python_module unittest2 >= 0.8.0}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
# Documentation requirements:
|
||||
BuildRequires: python3-Sphinx
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module pbr}
|
||||
BuildRequires: %{python_module extras >= 1.0.0}
|
||||
Requires: python-extras >= 1.0.0
|
||||
Requires: python-fixtures >= 1.3.0
|
||||
Requires: python-pbr >= 0.11
|
||||
@@ -55,39 +48,20 @@ framework. These extensions have been derived from many years of experience
|
||||
with unit tests in Python and come from many different sources. testtools
|
||||
also ports recent unittest changes all the way back to Python 2.4.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Group: Documentation/HTML
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description doc
|
||||
Documentation and help files for python3-testtools.
|
||||
|
||||
%prep
|
||||
%setup -q -n testtools-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%{_python_use_flavor python3}
|
||||
%__python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
%python_exec -m testtools.run testtools.tests.test_suite
|
||||
%endif
|
||||
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE NEWS README.rst
|
||||
%{python_sitelib}/testtools
|
||||
%{python_sitelib}/testtools-%{version}-py%{python_version}.egg-info
|
||||
|
||||
%files %{python_files doc}
|
||||
%defattr(-,root,root,-)
|
||||
%doc build/sphinx/html
|
||||
%{python_sitelib}/testtools-%{version}-py*.egg-info
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user