|
|
@ -1,13 +1,11 @@
|
|
|
|
%global srcname hypothesis
|
|
|
|
Name: python-hypothesis
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-%{srcname}
|
|
|
|
|
|
|
|
Version: 6.6.0
|
|
|
|
Version: 6.6.0
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Library for property based testing
|
|
|
|
Summary: Library for property based testing
|
|
|
|
|
|
|
|
|
|
|
|
License: MPLv2.0
|
|
|
|
License: MPLv2.0
|
|
|
|
URL: https://github.com/HypothesisWorks/hypothesis
|
|
|
|
URL: https://github.com/HypothesisWorks/hypothesis
|
|
|
|
Source0: %{url}/archive/%{srcname}-python-%{version}/%{srcname}-%{version}.tar.gz
|
|
|
|
Source0: %{url}/archive/hypothesis-python-%{version}/hypothesis-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
|
@ -15,14 +13,26 @@ BuildArch: noarch
|
|
|
|
%bcond_without tests
|
|
|
|
%bcond_without tests
|
|
|
|
%bcond_without doc
|
|
|
|
%bcond_without doc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
|
|
|
BuildRequires: pyproject-rpm-macros
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
|
|
|
# The test requires used by tox are defined in requirements/test.txt,
|
|
|
|
|
|
|
|
# but they are pinned, incl. transitive deps.
|
|
|
|
|
|
|
|
# The file is generated from requirements/test.in which has:
|
|
|
|
|
|
|
|
BuildRequires: %{py3_dist pexpect}
|
|
|
|
|
|
|
|
BuildRequires: %{py3_dist pytest}
|
|
|
|
|
|
|
|
BuildRequires: %{py3_dist pytest-xdist}
|
|
|
|
|
|
|
|
# RFE to use that file directly: https://bugzilla.redhat.com/show_bug.cgi?id=1936448
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%if %{with doc}
|
|
|
|
%if %{with doc}
|
|
|
|
# Manpage
|
|
|
|
|
|
|
|
BuildRequires: %{_bindir}/sphinx-build
|
|
|
|
BuildRequires: %{_bindir}/sphinx-build
|
|
|
|
BuildRequires: %{py3_dist sphinx-hoverxref}
|
|
|
|
BuildRequires: %{py3_dist sphinx-hoverxref}
|
|
|
|
BuildRequires: %{py3_dist sphinx-rtd-theme}
|
|
|
|
BuildRequires: %{py3_dist sphinx-rtd-theme}
|
|
|
|
BuildRequires: %{py3_dist sphinx_selective_exclude}
|
|
|
|
BuildRequires: %{py3_dist sphinx_selective_exclude}
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global _description %{expand:
|
|
|
|
%global _description %{expand:
|
|
|
|
Hypothesis is a library for testing your Python code against a much
|
|
|
|
Hypothesis is a library for testing your Python code against a much
|
|
|
|
larger range of examples than you would ever want to write by
|
|
|
|
larger range of examples than you would ever want to write by
|
|
|
@ -32,84 +42,67 @@ flow.}
|
|
|
|
|
|
|
|
|
|
|
|
%description %{_description}
|
|
|
|
%description %{_description}
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-%{srcname}
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-hypothesis
|
|
|
|
Summary: %{summary}
|
|
|
|
Summary: %{summary}
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
|
|
|
|
|
|
|
Obsoletes: platform-python-%{srcname} < %{version}-%{release}
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
|
|
|
|
|
BuildRequires: %{py3_dist attrs} >= 19.2.0
|
|
|
|
|
|
|
|
BuildRequires: %{py3_dist sortedcontainers}
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
|
|
|
BuildRequires: black
|
|
|
|
|
|
|
|
BuildRequires: %{py3_dist lark-parser}
|
|
|
|
|
|
|
|
BuildRequires: %{py3_dist numpy}
|
|
|
|
|
|
|
|
BuildRequires: %{py3_dist pandas}
|
|
|
|
|
|
|
|
BuildRequires: %{py3_dist pexpect}
|
|
|
|
|
|
|
|
BuildRequires: %{py3_dist pytest}
|
|
|
|
|
|
|
|
BuildRequires: %{py3_dist pytest-xdist}
|
|
|
|
|
|
|
|
BuildRequires: %{py3_dist typing-extensions}
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-%{srcname} %{_description}
|
|
|
|
%description -n python%{python3_pkgversion}-hypothesis %{_description}
|
|
|
|
|
|
|
|
|
|
|
|
Python 3 version.
|
|
|
|
|
|
|
|
|
|
|
|
%global extras cli ghostwriter pytz dateutil lark numpy pandas pytest redis zoneinfo django
|
|
|
|
%{?python_extras_subpkg:
|
|
|
|
|
|
|
|
%{python_extras_subpkg -n python%{python3_pkgversion}-%{srcname} -i %{python3_sitelib}/hypothesis-*.egg-info
|
|
|
|
|
|
|
|
cli
|
|
|
|
|
|
|
|
ghostwriter
|
|
|
|
|
|
|
|
pytz
|
|
|
|
|
|
|
|
dateutil
|
|
|
|
|
|
|
|
lark
|
|
|
|
|
|
|
|
numpy
|
|
|
|
|
|
|
|
pandas
|
|
|
|
|
|
|
|
pytest
|
|
|
|
|
|
|
|
redis
|
|
|
|
|
|
|
|
zoneinfo
|
|
|
|
|
|
|
|
django
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
# extras with missing deps:
|
|
|
|
# extras with missing deps:
|
|
|
|
# codemods: libcst
|
|
|
|
# codemods: libcst
|
|
|
|
# dpcontracts: dpcontracts
|
|
|
|
# dpcontracts: dpcontracts
|
|
|
|
|
|
|
|
%{pyproject_extras_subpkg -n python%{python3_pkgversion}-hypothesis %{extras}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%autosetup -n %{srcname}-%{srcname}-python-%{version}/%{srcname}-python -p2
|
|
|
|
%autosetup -n hypothesis-hypothesis-python-%{version}/hypothesis-python -p2
|
|
|
|
# disable Sphinx extensions that require Internet access
|
|
|
|
# disable Sphinx extensions that require Internet access
|
|
|
|
sed -i -e '/sphinx.ext.intersphinx/d' docs/conf.py
|
|
|
|
sed -i -e '/sphinx.ext.intersphinx/d' docs/conf.py
|
|
|
|
|
|
|
|
|
|
|
|
# remove tests we cannot run
|
|
|
|
|
|
|
|
rm -r tests/dpcontracts tests/redis # missing deps
|
|
|
|
%generate_buildrequires
|
|
|
|
|
|
|
|
# RFE to avoid the tr: https://bugzilla.redhat.com/show_bug.cgi?id=1936486
|
|
|
|
|
|
|
|
%pyproject_buildrequires %{?with_tests:-x %(echo %{extras} | tr ' ' ',')}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
%py3_build
|
|
|
|
%pyproject_wheel
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with doc}
|
|
|
|
%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
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%install
|
|
|
|
%py3_install
|
|
|
|
%pyproject_install
|
|
|
|
|
|
|
|
%pyproject_save_files hypothesis
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with doc}
|
|
|
|
%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
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
%if %{with tests}
|
|
|
|
%check
|
|
|
|
%check
|
|
|
|
%pytest -v -n auto \
|
|
|
|
%pytest -v -n auto \
|
|
|
|
-k "not test_registered_from_entrypoint" \
|
|
|
|
-k "not test_registered_from_entrypoint" \
|
|
|
|
--ignore tests/codemods \
|
|
|
|
--ignore tests/codemods \
|
|
|
|
|
|
|
|
--ignore tests/dpcontracts \
|
|
|
|
|
|
|
|
--ignore tests/redis \
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-%{srcname}
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-hypothesis -f %{pyproject_files}
|
|
|
|
%license ../LICENSE.txt
|
|
|
|
%license ../LICENSE.txt
|
|
|
|
%doc README.rst
|
|
|
|
%doc README.rst
|
|
|
|
%{_bindir}/hypothesis
|
|
|
|
%{_bindir}/hypothesis
|
|
|
|
%{python3_sitelib}/hypothesis-*.egg-info
|
|
|
|
|
|
|
|
%{python3_sitelib}/hypothesis/
|
|
|
|
|
|
|
|
%if %{with doc}
|
|
|
|
%if %{with doc}
|
|
|
|
%{_mandir}/man1/hypothesis.1*
|
|
|
|
%{_mandir}/man1/hypothesis.1*
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
* Mon Mar 08 2021 Miro Hrončok <mhroncok@redhat.com> - 6.6.0-1
|
|
|
|
* Mon Mar 08 2021 Miro Hrončok <mhroncok@redhat.com> - 6.6.0-1
|
|
|
|
- Update to 6.6.0
|
|
|
|
- Update to 6.6.0
|
|
|
|