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