forked from pool/python-hypothesis
Accepting request 635548 from home:mcepl:work
Add multibuild to allow running tests. OBS-URL: https://build.opensuse.org/request/show/635548 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=82
This commit is contained in:
parent
e3bb9a4555
commit
2c4ee61954
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Sep 9 22:39:31 CEST 2018 - Matěj Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Add multibuild to allow running tests.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Sep 8 19:08:09 UTC 2018 - Arun Persaud <arun@gmx.de>
|
Sat Sep 8 19:08:09 UTC 2018 - Arun Persaud <arun@gmx.de>
|
||||||
|
|
||||||
|
@ -23,10 +23,19 @@
|
|||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%define oldpython python
|
%define oldpython python
|
||||||
%bcond_without python2
|
%bcond_without python2
|
||||||
# Unfortunately we cannot test by default, because of the circular
|
|
||||||
# dependency on pytest
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define test 1
|
||||||
|
%bcond_without test
|
||||||
|
%else
|
||||||
%bcond_with test
|
%bcond_with test
|
||||||
|
%endif
|
||||||
|
%if %{with test}
|
||||||
|
Name: python-hypothesis-%{flavor}
|
||||||
|
%else
|
||||||
Name: python-hypothesis
|
Name: python-hypothesis
|
||||||
|
%endif
|
||||||
Version: 3.71.0
|
Version: 3.71.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A library for property based testing
|
Summary: A library for property based testing
|
||||||
@ -53,6 +62,7 @@ BuildRequires: %{python_module coverage}
|
|||||||
BuildRequires: %{python_module flaky}
|
BuildRequires: %{python_module flaky}
|
||||||
BuildRequires: %{python_module mock}
|
BuildRequires: %{python_module mock}
|
||||||
BuildRequires: %{python_module pytest >= 3.0.0}
|
BuildRequires: %{python_module pytest >= 3.0.0}
|
||||||
|
BuildRequires: python3-Django
|
||||||
%endif
|
%endif
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%if %{with python2}
|
%if %{with python2}
|
||||||
@ -89,16 +99,19 @@ $python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hy
|
|||||||
%fdupes %{buildroot}%{$python_sitelib}
|
%fdupes %{buildroot}%{$python_sitelib}
|
||||||
}
|
}
|
||||||
|
|
||||||
%if %{with test}
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with test} && ! %{with python2}
|
||||||
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
||||||
py.test-%{$python_bin_suffix} test
|
py.test-%{$python_bin_suffix} tests
|
||||||
}
|
}
|
||||||
|
rm -rf %{buildroot}%{_datarootdir}/python*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc ../CITATION README.rst
|
|
||||||
%license ../LICENSE.txt
|
%license ../LICENSE.txt
|
||||||
|
%if !%{with test}
|
||||||
|
%doc ../CITATION README.rst
|
||||||
%{python_sitelib}/hypothesis*
|
%{python_sitelib}/hypothesis*
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user