12
0
forked from pool/python-py

Accepting request 842294 from home:jayvdb:branches:devel:languages:python:pytest

- Devendor apipkg and iniconfig
- Add pr_122.patch to activate test suite

OBS-URL: https://build.opensuse.org/request/show/842294
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-py?expand=0&rev=20
This commit is contained in:
Tomáš Chvátal
2020-10-19 05:58:33 +00:00
committed by Git OBS Bridge
parent 929b6f3baf
commit 1695fe3a86
3 changed files with 571 additions and 3 deletions

View File

@@ -34,8 +34,14 @@ License: MIT
Group: Development/Languages/Python
URL: https://github.com/pytest-dev/py
Source: https://files.pythonhosted.org/packages/source/p/py/py-%{version}.tar.gz
# https://github.com/pytest-dev/py/pull/222
Patch0: pr_222.patch
BuildRequires: %{python_module apipkg}
BuildRequires: %{python_module iniconfig}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
Requires: python-apipkg
Requires: python-iniconfig
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Obsoletes: %{oldpython}-py-docs
@@ -57,11 +63,13 @@ the following tools and modules:
%prep
%setup -q -n py-%{version}
%patch0 -p1
rm -rf py.egg-info
rm -f tox.ini
# https://github.com/pytest-dev/py/issues/162
rm -f testing/log/test_warning.py
rm -r py/_vendored_packages
%build
%python_build
@@ -75,10 +83,9 @@ rm -f testing/log/test_warning.py
%check
%if %{with test}
export LANG=en_US.UTF-8
# the passing is because upstream does not care about the results for now and
# pinned pytest 3 in the repo (as this module is deprecated)
# In addition to PR 222, there are other tests failing due to changes in pytest 5 & 6
# https://github.com/pytest-dev/py/issues/209
%pytest || :
%pytest -k 'not (test_getdimensions or test_format_excinfo or test_excinfo_repr or test_excinfo_str or test_syntaxerror_rerepresentation or test_len or test_power or test_comments)'
%endif
%if !%{with test}