From ec821029a5e95064d020202dc821f6a86b47c9d4 Mon Sep 17 00:00:00 2001 From: Miro Hrončok Date: Aug 15 2019 07:29:24 +0000 Subject: Further bootstrap for Python 3.8 --- diff --git a/python-hypothesis.spec b/python-hypothesis.spec index 538b652..2c589c2 100644 --- a/python-hypothesis.spec +++ b/python-hypothesis.spec @@ -1,4 +1,5 @@ %global _without_tests 1 +%global _without_doc 1 %{?python_enable_dependency_generator} %global srcname hypothesis @@ -11,13 +12,16 @@ License: MPLv2.0 URL: https://github.com/HypothesisWorks/hypothesis-python Source0: %{url}/archive/%{srcname}-python-%{version}/%{srcname}-%{version}.tar.gz -# Manpage -BuildRequires: %{_bindir}/sphinx-build - BuildArch: noarch # Needs pytest and others, but hypothesis is built sooner than pytest when bootstrapping %bcond_without tests +%bcond_without doc + +%if %{with doc} +# Manpage +BuildRequires: %{_bindir}/sphinx-build +%endif %global _description \ Hypothesis is a library for testing your Python code against a much\ @@ -83,12 +87,16 @@ rm -r tests/django # doesn't work, maybe bad django version %build %py2_build %py3_build +%if %{with doc} PYTHONPATH=src READTHEDOCS=True sphinx-build -b man docs docs/_build/man +%endif %install %py2_install %py3_install +%if %{with doc} %{__install} -Dpm0644 -t %{buildroot}%{_mandir}/man1 docs/_build/man/hypothesis.1 +%endif %if %{with tests} %check @@ -100,14 +108,18 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-3 -v -n auto -k "not test_healt %doc README.rst %{python2_sitelib}/hypothesis-*.egg-info/ %{python2_sitelib}/hypothesis/ +%if %{with doc} %{_mandir}/man1/hypothesis.1* +%endif %files -n python3-%{srcname} %license ../LICENSE.txt %doc README.rst %{python3_sitelib}/hypothesis-*.egg-info %{python3_sitelib}/hypothesis/ +%if %{with doc} %{_mandir}/man1/hypothesis.1* +%endif %changelog * Thu Aug 15 2019 Miro Hrončok - 4.23.8-3