14
0

- Add tests-tests_require.patch fixing broken tests

(gh#toabctl/metaextract#20).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-metaextract?expand=0&rev=41
This commit is contained in:
2024-10-02 11:18:00 +00:00
committed by Git OBS Bridge
commit d0a8d366cb
6 changed files with 311 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
1.0.9.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ccc8c8cbaad258ed9538093c64196eb393504075bd0f06fb31276148be7abda
size 19572

154
python-metaextract.changes Normal file
View File

@@ -0,0 +1,154 @@
-------------------------------------------------------------------
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>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Fri Oct 14 05:40:11 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
- Change preun to postun for update alternatives
- Remove not needed setup.py patch
- Change shared files python-sitelib glob to package
- Update source package
-------------------------------------------------------------------
Thu Oct 13 15:05:49 UTC 2022 - Thomas Bechtold <thomasbechtold@jpberlin.de>
- Update to Version 1.0.9:
* ci: drop python 3.7, add python 3.10
* Add initial support for packages without setup.py
* Update badge given that github actions are now used
-------------------------------------------------------------------
Thu Sep 29 16:10:29 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to Version 1.0.8:
* Merge pull request #15 from toabctl/gh-instead-of-travis
* Move from Travis CI to github actions
* Merge pull request #14 from toabctl/drop-pytest-runner
* Post release version bump to 1.0.8
* setup.py: drop setup_requires including setuptools and pytest-runner
* Merge pull request #12 from jayvdb/json_dumps_default
* Use default json encoder 'str'
-------------------------------------------------------------------
Wed Dec 8 12:34:45 UTC 2021 - pgajdos@suse.com
- do not require pytest-runner for build, it is not needed
-------------------------------------------------------------------
Sun Mar 29 05:33:31 UTC 2020 - Thomas Bechtold <tbechtold@suse.com>
- update to 1.0.7:
* Use default json encoder 'str'
-------------------------------------------------------------------
Tue Aug 27 07:31:50 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Use noun phrase in summary. Trim history from description.
Fix wrong "it's".
-------------------------------------------------------------------
Thu Aug 8 08:37:50 UTC 2019 - Thomas Bechtold <tbechtold@suse.com>
- Capitalize summary to make rpmlint happy
-------------------------------------------------------------------
Thu Aug 8 08:35:17 UTC 2019 - Thomas Bechtold <tbechtold@suse.com>
- update to 1.0.6:
* Switch to python 3.7
* travis: Use py36 for pep8 tox env
* Fix tests when using pytest >= 5
-------------------------------------------------------------------
Fri Jun 21 12:54:53 UTC 2019 - pgajdos@suse.com
- run the testsuite in %check
-------------------------------------------------------------------
Thu Mar 7 11:11:14 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Fix fdupes call
-------------------------------------------------------------------
Tue Dec 4 12:50:22 UTC 2018 - Matej Cepl <mcepl@suse.com>
- Remove superfluous devel dependency for noarch package
-------------------------------------------------------------------
Fri Nov 9 16:51:37 UTC 2018 - Thomas Bechtold <tbechtold@suse.com>
- update to 1.0.5:
* Add more key from setup.py to output
* tests: Only check expected key/value pairs
* Post release version bump to 1.0.5
-------------------------------------------------------------------
Sat Jun 9 13:31:52 UTC 2018 - tbechtold@suse.com
- update to 1.0.4:
* Convert sets used in entry_points to lists
* Fix unittests
* Post release version bump to 1.0.4
- use %license macro
-------------------------------------------------------------------
Mon Sep 18 13:22:31 UTC 2017 - tbechtold@suse.com
- update to 1.0.3:
* Release 1.0.3
* Test python 3.6 instead of 3.5
* Fix json serialization for dict_items on py3 (#4)
-------------------------------------------------------------------
Thu Apr 27 17:52:38 UTC 2017 - toddrme2178@gmail.com
- Implement single-spec version.
-------------------------------------------------------------------
Mon Apr 24 13:00:02 UTC 2017 - tbechtold@suse.com
update to version 1.0.2
* Fix entrypoint typo 'metaextact'
-------------------------------------------------------------------
Tue Feb 28 23:06:08 UTC 2017 - tbechtold@suse.com
update to version 1.0.0
* Allow to specify the used python interpreter
* Fix utils import in python3 case
* Post release version bump to 1.0.0
-------------------------------------------------------------------
Tue Feb 28 18:53:16 UTC 2017 - tbechtold@suse.com
update to version 0.0.9
* Improve tests with extras_require
* Fix documentation link in README
* Post release version bump to 0.0.9
* Support "python_requires"
* Use same version for doc and sdist
* Add doc badge to README
* Use already used python interpreter
* Post release version bump to 0.0.8
* Use Sphinx to build documentation
-------------------------------------------------------------------
Mon Aug 29 17:55:42 UTC 2016 - tbechtold@suse.com
update to version 0.0.7
* Sort some of the data keys
* Post release version bump to 0.0.7
* Sort json dump by key
-------------------------------------------------------------------
Sun Aug 28 06:14:54 UTC 2016 - tbechtold@suse.com
- Initial packaging (version 0.0.6)

81
python-metaextract.spec Normal file
View File

@@ -0,0 +1,81 @@
#
# spec file for package python-metaextract
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-metaextract
Version: 1.0.9
Release: 0
Summary: Module to collect metadata for Python modules
License: Apache-2.0
Group: Development/Languages/Python
URL: http://github.com/toabctl/metaextract
Source: https://github.com/toabctl/metaextract/archive/%{version}.tar.gz
# 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: python-rpm-macros
# Needed even though no tests are present
BuildRequires: %{python_module pbr}
BuildRequires: %{python_module pytest}
Requires: python-setuptools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
metaextract is a tool to collect metadata about a python module. For
example, it can determine and collect the dependencies of a sdist
tarball that was retrieved from the Python Package Index.
The tool was first developed in py2pack but is now its own module.
%prep
%autosetup -p1 -n metaextract-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/metaextract
%post
%python_install_alternative metaextract
%postun
%python_uninstall_alternative metaextract
%check
%pytest
%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst
%license LICENSE
%python_alternative %{_bindir}/metaextract
%{python_sitelib}/metaextract
%{python_sitelib}/metaextract-%{version}*-info
%changelog

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'}
),
(