From be9600f6bb52473702f06ff15a60abb2fef4df8ddd6f98e535b60dd248990722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 5 Sep 2018 11:17:34 +0000 Subject: [PATCH] Accepting request 633315 from home:mcepl:work - Clean up SPEC - Add %check section, but make it disabled per default (circular dependency on pytest) - Precompile Python files to avoid troubles with mtime and magic values. OBS-URL: https://build.opensuse.org/request/show/633315 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hypothesis?expand=0&rev=79 --- python-hypothesis.changes | 12 ++++++++++++ python-hypothesis.spec | 18 +++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/python-hypothesis.changes b/python-hypothesis.changes index 1d3cf97..7aceef2 100644 --- a/python-hypothesis.changes +++ b/python-hypothesis.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Sep 5 10:02:37 UTC 2018 - Matěj Cepl + +- Precompile Python files to avoid troubles with mtime and magic values. + +------------------------------------------------------------------- +Tue Sep 4 16:01:22 UTC 2018 - Matěj Cepl + +- Clean up SPEC +- Add %check section, but make it disabled per default (circular + dependency on pytest) + ------------------------------------------------------------------- Fri Aug 31 11:55:29 UTC 2018 - Tomáš Chvátal diff --git a/python-hypothesis.spec b/python-hypothesis.spec index 9485586..7758470 100644 --- a/python-hypothesis.spec +++ b/python-hypothesis.spec @@ -23,6 +23,9 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python %bcond_without python2 +# Unfortunately we cannot test by default, because of the circular +# dependency on pytest +%bcond_with test Name: python-hypothesis Version: 3.66.6 Release: 0 @@ -43,12 +46,14 @@ Recommends: python-pandas Recommends: python-pytest >= 2.8.0 Recommends: python-pytz BuildArch: noarch +%if %{with test} # SECTION test requirements BuildRequires: %{python_module attrs >= 16.0.0} BuildRequires: %{python_module coverage} BuildRequires: %{python_module flaky} BuildRequires: %{python_module mock} BuildRequires: %{python_module pytest >= 2.8.0} +%endif # /SECTION %if %{with python2} BuildRequires: python-enum34 @@ -78,7 +83,18 @@ work on Jython or on Python 3.0 through 3.2. %install %python_install -%python_expand %fdupes %{buildroot}%{$python_sitelib} +%{python_expand \ +$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/ +$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/hypothesis/ +%fdupes %{buildroot}%{$python_sitelib} +} + +%if %{with test} +%check +%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib} +py.test-%{$python_bin_suffix} test +} +%endif %files %{python_files} %doc ../CITATION README.rst