14
0

Accepting request 1205230 from devel:languages:python

- Add tests-tests_require.patch fixing broken tests
  (gh#toabctl/metaextract#20).

OBS-URL: https://build.opensuse.org/request/show/1205230
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-metaextract?expand=0&rev=20
This commit is contained in:
2024-10-02 19:36:14 +00:00
committed by Git OBS Bridge
3 changed files with 65 additions and 6 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Oct 2 11:17:35 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Add tests-tests_require.patch fixing broken tests
(gh#toabctl/metaextract#20).
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jun 21 15:27:55 UTC 2023 - ecsos <ecsos@opensuse.org> Wed Jun 21 15:27:55 UTC 2023 - ecsos <ecsos@opensuse.org>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-metaextract # spec file for package python-metaextract
# #
# Copyright (c) 2022 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
@@ -25,7 +25,11 @@ License: Apache-2.0
Group: Development/Languages/Python Group: Development/Languages/Python
URL: http://github.com/toabctl/metaextract URL: http://github.com/toabctl/metaextract
Source: https://github.com/toabctl/metaextract/archive/%{version}.tar.gz Source: https://github.com/toabctl/metaextract/archive/%{version}.tar.gz
BuildRequires: %{python_module setuptools} # PATCH-FIX-UPSTREAM tests-tests_require.patch gh#toabctl/metaextract#20 mcepl@suse.com
# Fix failing tests
Patch0: tests-tests_require.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
# Needed even though no tests are present # Needed even though no tests are present
@@ -35,7 +39,7 @@ Requires: python-setuptools
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch BuildArch: noarch
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun):update-alternatives Requires(postun): update-alternatives
%python_subpackages %python_subpackages
%description %description
@@ -46,13 +50,13 @@ tarball that was retrieved from the Python Package Index.
The tool was first developed in py2pack but is now its own module. The tool was first developed in py2pack but is now its own module.
%prep %prep
%setup -q -n metaextract-%{version} %autosetup -p1 -n metaextract-%{version}
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/metaextract %python_clone -a %{buildroot}%{_bindir}/metaextract

49
tests-tests_require.patch Normal file
View File

@@ -0,0 +1,49 @@
---
metaextract/tests/test_metaextract.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- a/metaextract/tests/test_metaextract.py
+++ b/metaextract/tests/test_metaextract.py
@@ -147,7 +147,7 @@ class TestMetaExtract(object):
'entry_points': None, 'extras_require': {'extra1': ['pkg1']},
'install_requires': ['bar', 'foo'], 'python_requires': None,
'setup_requires': [], 'has_ext_modules': None,
- 'scripts': None, 'data_files': None, 'tests_require': None}
+ 'scripts': None, 'data_files': None}
),
(
"setuptools_simple_unicode", {
@@ -155,14 +155,14 @@ class TestMetaExtract(object):
'extra1': ['pkg1'], 'extra2': ['pkg2', 'pkg3']},
'install_requires': ['bar', 'foo'], 'python_requires': None,
'setup_requires': [], 'has_ext_modules': None,
- 'scripts': None, 'data_files': None, 'tests_require': None}
+ 'scripts': None, 'data_files': None}
),
(
"setuptools_simple_unicode_and_header", {
'entry_points': None, 'extras_require': {},
'install_requires': ['bar', 'foo'], 'python_requires': None,
'setup_requires': [], 'has_ext_modules': None,
- 'scripts': None, 'data_files': None, 'tests_require': None}
+ 'scripts': None, 'data_files': None}
),
(
"setuptools_full", {
@@ -174,7 +174,7 @@ class TestMetaExtract(object):
['share/doc/testpgk',
['AUTHORS', 'LICENSE', 'README.rst']],
['share/doc/testpkg/html', ['doc/testpkg.html']],
- ], 'tests_require': ['testpkg1'], 'entry_points':
+ ], 'entry_points':
{
'console_scripts': ['testpkgp1=testpkg:main']
},
@@ -207,7 +207,6 @@ class TestMetaExtract(object):
'extras_require': {}, 'install_requires': [],
'python_requires': None, 'setup_requires': ['pbr>=1.0'],
'has_ext_modules': None, 'scripts': None, 'data_files': None,
- 'tests_require': None,
'version': '1'}
),
(