forked from pool/python-testtools
- Really run the tests
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-testtools?expand=0&rev=57
This commit is contained in:
committed by
Git OBS Bridge
parent
5962f9135b
commit
1b3076928a
@@ -23,21 +23,16 @@ Release: 0
|
||||
Summary: Documentation for python-testtools
|
||||
License: MIT
|
||||
Group: Documentation/HTML
|
||||
Url: https://launchpad.net/testtools
|
||||
Source: https://pypi.io/packages/source/t/testtools/testtools-%{version}.tar.gz
|
||||
BuildRequires: %{python_module testtools = %{version}}
|
||||
BuildRequires: python-rpm-macros
|
||||
%if %{with tests}
|
||||
# Test requirement
|
||||
BuildRequires: %{python_module testscenarios = %{version}}
|
||||
BuildRequires: %{python_module unittest2 >= 0.8.0}
|
||||
%endif
|
||||
# Documentation requirements:
|
||||
URL: https://launchpad.net/testtools
|
||||
Source: https://files.pythonhosted.org/packages/source/t/testtools/testtools-%{version}.tar.gz
|
||||
Patch0: testtools-py37.patch
|
||||
BuildRequires: %{python_module testscenarios}
|
||||
BuildRequires: %{python_module testtools = %{version}}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-Sphinx
|
||||
Provides: python2-testtools-doc = %{version}
|
||||
Provides: python3-testtools-doc = %{version}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
@@ -45,6 +40,7 @@ Documentation and help files for python-testtools.
|
||||
|
||||
%prep
|
||||
%setup -q -n testtools-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
|
||||
@@ -54,16 +50,11 @@ mkdir -p %{buildroot}%{_docdir}/python-testtools/
|
||||
cp -r build/sphinx/html %{buildroot}%{_docdir}/python-testtools/
|
||||
%fdupes %{buildroot}%{_docdir}
|
||||
|
||||
# A build cycle exists between python-extras and python-testtools.
|
||||
# Doing the tests in a separate package avoids this cycle.
|
||||
%if %{with tests}
|
||||
%check
|
||||
%{python_exec} -m testtools.run testtools.tests.test_suite
|
||||
%endif
|
||||
%python_exec -m testtools.run testtools.tests.test_suite
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE
|
||||
%license LICENSE
|
||||
%{_docdir}/python-testtools/
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user