Accepting request 1156454 from home:bnavigator:branches:devel:languages:python:pytest
- Fix requirements for python39 (yes really) - Make brittle test "fix" depending on the undocumented value of unexpanded %python_bin_suffix more robust OBS-URL: https://build.opensuse.org/request/show/1156454 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-console-scripts?expand=0&rev=25
This commit is contained in:
parent
73c94232ea
commit
0d21f78e9e
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 8 20:17:05 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Fix requirements for python39 (yes really)
|
||||||
|
- Make brittle test "fix" depending on the undocumented value of
|
||||||
|
unexpanded %python_bin_suffix more robust
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Jul 19 13:34:19 UTC 2023 - ecsos <ecsos@opensuse.org>
|
Wed Jul 19 13:34:19 UTC 2023 - ecsos <ecsos@opensuse.org>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pytest-console-scripts
|
# spec file for package python-pytest-console-scripts
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -24,14 +24,17 @@ Summary: Pytest plugin for testing console scripts
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/kvas-it/pytest-console-scripts
|
URL: https://github.com/kvas-it/pytest-console-scripts
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pytest-console-scripts/pytest-console-scripts-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pytest-console-scripts/pytest-console-scripts-%{version}.tar.gz
|
||||||
|
BuildRequires: %{python_module importlib-metadata >= 3.6 if %python-base < 3.10}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
|
BuildRequires: %{python_module pytest >= 4.0.0}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-pytest >= 4.0.0
|
Requires: python-pytest >= 4.0.0
|
||||||
|
Requires: (python-importlib-metadata >= 3.6 if python-base < 3.10)
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module pytest >= 4.0.0}
|
|
||||||
BuildRequires: %{python_module setuptools_scm}
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
BuildRequires: %{python_module virtualenv >= 20}
|
BuildRequires: %{python_module virtualenv >= 20}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
@ -57,17 +60,18 @@ much as possible.
|
|||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if 0%{?suse_version} > 1500
|
cp tests/test_run_scripts.py template_run_scripts.py
|
||||||
sed -i 's:env python:env python3:' tests/test_run_scripts.py
|
export PYTHONDONTWRITEBYTECODE=1
|
||||||
%else
|
%{python_expand #
|
||||||
sed -i 's:env python:env python%{python_bin_suffix}:' tests/test_run_scripts.py
|
export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
||||||
%endif
|
sed 's|env python|$python|' template_run_scripts.py > tests/test_run_scripts.py
|
||||||
%pytest
|
$python -m pytest -v
|
||||||
|
}
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{python_sitelib}/pytest_console_scripts
|
%{python_sitelib}/pytest_console_scripts
|
||||||
%{python_sitelib}/pytest_console_scripts-%{version}*-info
|
%{python_sitelib}/pytest_console_scripts-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user