Update to 5.4.2 (#1707986), add %bcond tests

This commit is contained in:
Miro Hrončok 2020-05-29 16:28:40 +02:00
parent 329bdb9473
commit 5dd3a01122
3 changed files with 56 additions and 37 deletions

3
.gitignore vendored
View File

@ -1,2 +1,5 @@
/pytest-*.zip
/pytest-*.tar.gz
/pytest-*/
/results_*/
*.rpm

View File

@ -1,26 +1,63 @@
Name: pytest
Version: 4.6.10
Release: 3%{?dist}
Version: 5.4.2
Release: 1%{?dist}
Summary: Simple powerful testing with Python
License: MIT
URL: https://pytest.org
Source0: %{pypi_source}
# The test in this specfile use pytest-timeout
# When building pytest for the first time with new Python version
# we might not yet have all the BRs, those conditionals allow us to do that.
# This can be used to disable all tests for faster bootstrapping
%bcond_without tests
# Only disabling the optional tests is a more complex but careful approach
# Pytest will skip the related tests, so we only conditionalize the BRs
# This bcond is ignored when tests are disabled
%bcond_without optional_tests
# To run the tests in %%check we use pytest-timeout
# When building pytest for the first time with new Python version
# that is not possible as it depends on pytest
# The bcond is ignored when tests are disabled
%bcond_without timeout
# When building pytest for the first time with new Python version
# we might not yet have all the BRs, this allows us to build without some that
# are likely not yet built.
# Pytest will skip the related tests, so we only conditionalize the BRs
%bcond_without optional_tests
# When building pytest for the first time with new Python version
# we also don't have sphinx yet and cannot build docs.
%bcond_without docs
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
# Those are also runtime deps, needed for tests and docs
# We keep them unconditionality, so we don't accidentally build pytest
# before them and get broken dependencies
BuildRequires: python3-atomicwrites
BuildRequires: python3-attrs
BuildRequires: python3-more-itertools
BuildRequires: python3-packaging
BuildRequires: python3-pluggy >= 0.12
BuildRequires: python3-py >= 1.5.0
BuildRequires: python3-six
BuildRequires: python3-wcwidth
%if %{with tests}
BuildRequires: python3-hypothesis
BuildRequires: python3-xmlschema
%if %{with optional_tests}
BuildRequires: python3-argcomplete
BuildRequires: python3-decorator
BuildRequires: python3-jinja2
BuildRequires: python3-nose
BuildRequires: python3-twisted
%endif
%if %{with timeout}
BuildRequires: python3-pytest-timeout
%endif
%endif
%if %{with docs}
BuildRequires: %{_bindir}/rst2html
BuildRequires: python3-pygments-pytest
@ -38,31 +75,6 @@ py.test provides simple, yet powerful testing for Python.
%package -n python3-%{name}
Summary: Simple powerful testing with Python
BuildRequires: python3-atomicwrites
BuildRequires: python3-attrs
BuildRequires: python3-devel
BuildRequires: python3-hypothesis
BuildRequires: python3-more-itertools
BuildRequires: python3-packaging
BuildRequires: python3-pluggy >= 0.12
BuildRequires: python3-py >= 1.5.0
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
BuildRequires: python3-six
BuildRequires: python3-wcwidth
%if %{with timeout}
BuildRequires: python3-pytest-timeout
%endif
%if %{with optional_tests}
BuildRequires: python3-argcomplete
BuildRequires: python3-decorator
BuildRequires: python3-jinja2
BuildRequires: python3-nose
BuildRequires: python3-twisted
%endif
%{?python_provide:%python_provide python3-%{name}}
Provides: pytest = %{version}-%{release}
Conflicts: python-pytest < 4.6
@ -110,6 +122,7 @@ find %{buildroot}%{python3_sitelib} \
-name '*.py' \
-exec sed -i -e '1{/^#!/d}' {} \;
%if %{with tests}
%check
PYTHONDONTWRITEBYTECODE=1 \
PATH=%{buildroot}%{_bindir}:${PATH} \
@ -118,6 +131,7 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} \
%if %{with timeout}
--timeout=30
%endif
%endif
%files -n python3-%{name}
%if %{with docs}
@ -135,10 +149,12 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} \
%{_bindir}/py.test-%{python3_version}
%{python3_sitelib}/pytest-*.egg-info/
%{python3_sitelib}/_pytest/
%{python3_sitelib}/pytest.py
%{python3_sitelib}/__pycache__/pytest.*
%{python3_sitelib}/pytest/
%changelog
* Fri May 29 2020 Miro Hrončok <mhroncok@redhat.com> - 5.4.2-1
- Update to 5.4.2 (#1707986)
* Sun May 24 2020 Miro Hrončok <mhroncok@redhat.com> - 4.6.10-3
- Rebuilt for Python 3.9

View File

@ -1 +1 @@
SHA512 (pytest-4.6.10.tar.gz) = 73668967f6568654cdf92e260ada79d9685fcfc30967499709caeb12527e39a9e886f057c4c73e8a39125c0fbfcd674d905b7023402ce0ab9e836aa77d3888cb
SHA512 (pytest-5.4.2.tar.gz) = c92ffa613a02cee2580d690c24b76f16957082b138cf7c51d277b0fb5098fab2272ab73295e5e368cbd908026130a9185a35f8792054e36b7ade0a05f7f3f192