Further bootstrap for Python 3.8

epel9
Miro Hrončok 6 years ago
parent c85ffbabe5
commit ec821029a5

@ -1,4 +1,5 @@
%global _without_tests 1 %global _without_tests 1
%global _without_doc 1
%{?python_enable_dependency_generator} %{?python_enable_dependency_generator}
%global srcname hypothesis %global srcname hypothesis
@ -11,13 +12,16 @@ License: MPLv2.0
URL: https://github.com/HypothesisWorks/hypothesis-python URL: https://github.com/HypothesisWorks/hypothesis-python
Source0: %{url}/archive/%{srcname}-python-%{version}/%{srcname}-%{version}.tar.gz Source0: %{url}/archive/%{srcname}-python-%{version}/%{srcname}-%{version}.tar.gz
# Manpage
BuildRequires: %{_bindir}/sphinx-build
BuildArch: noarch BuildArch: noarch
# Needs pytest and others, but hypothesis is built sooner than pytest when bootstrapping # Needs pytest and others, but hypothesis is built sooner than pytest when bootstrapping
%bcond_without tests %bcond_without tests
%bcond_without doc
%if %{with doc}
# Manpage
BuildRequires: %{_bindir}/sphinx-build
%endif
%global _description \ %global _description \
Hypothesis is a library for testing your Python code against a much\ 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 %build
%py2_build %py2_build
%py3_build %py3_build
%if %{with doc}
PYTHONPATH=src READTHEDOCS=True sphinx-build -b man docs docs/_build/man PYTHONPATH=src READTHEDOCS=True sphinx-build -b man docs docs/_build/man
%endif
%install %install
%py2_install %py2_install
%py3_install %py3_install
%if %{with doc}
%{__install} -Dpm0644 -t %{buildroot}%{_mandir}/man1 docs/_build/man/hypothesis.1 %{__install} -Dpm0644 -t %{buildroot}%{_mandir}/man1 docs/_build/man/hypothesis.1
%endif
%if %{with tests} %if %{with tests}
%check %check
@ -100,14 +108,18 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-3 -v -n auto -k "not test_healt
%doc README.rst %doc README.rst
%{python2_sitelib}/hypothesis-*.egg-info/ %{python2_sitelib}/hypothesis-*.egg-info/
%{python2_sitelib}/hypothesis/ %{python2_sitelib}/hypothesis/
%if %{with doc}
%{_mandir}/man1/hypothesis.1* %{_mandir}/man1/hypothesis.1*
%endif
%files -n python3-%{srcname} %files -n python3-%{srcname}
%license ../LICENSE.txt %license ../LICENSE.txt
%doc README.rst %doc README.rst
%{python3_sitelib}/hypothesis-*.egg-info %{python3_sitelib}/hypothesis-*.egg-info
%{python3_sitelib}/hypothesis/ %{python3_sitelib}/hypothesis/
%if %{with doc}
%{_mandir}/man1/hypothesis.1* %{_mandir}/man1/hypothesis.1*
%endif
%changelog %changelog
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 4.23.8-3 * Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 4.23.8-3

Loading…
Cancel
Save