From d0a8d366cbcbc0afac9e3ef3fdb46febdffc47262858eb20c41af0c818ee333e Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 2 Oct 2024 11:18:00 +0000 Subject: [PATCH] - 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 --- .gitattributes | 23 ++++++ .gitignore | 1 + 1.0.9.tar.gz | 3 + python-metaextract.changes | 154 +++++++++++++++++++++++++++++++++++++ python-metaextract.spec | 81 +++++++++++++++++++ tests-tests_require.patch | 49 ++++++++++++ 6 files changed, 311 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 1.0.9.tar.gz create mode 100644 python-metaextract.changes create mode 100644 python-metaextract.spec create mode 100644 tests-tests_require.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/1.0.9.tar.gz b/1.0.9.tar.gz new file mode 100644 index 0000000..81ef8d9 --- /dev/null +++ b/1.0.9.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ccc8c8cbaad258ed9538093c64196eb393504075bd0f06fb31276148be7abda +size 19572 diff --git a/python-metaextract.changes b/python-metaextract.changes new file mode 100644 index 0000000..657c100 --- /dev/null +++ b/python-metaextract.changes @@ -0,0 +1,154 @@ +------------------------------------------------------------------- +Wed Oct 2 11:17:35 UTC 2024 - Matej Cepl + +- Add tests-tests_require.patch fixing broken tests + (gh#toabctl/metaextract#20). + +------------------------------------------------------------------- +Wed Jun 21 15:27:55 UTC 2023 - ecsos + +- Add %{?sle15_python_module_pythons} + +------------------------------------------------------------------- +Fri Oct 14 05:40:11 UTC 2022 - Daniel Garcia + +- 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 + +- 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 + +- 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 + +- update to 1.0.7: + * Use default json encoder 'str' + +------------------------------------------------------------------- +Tue Aug 27 07:31:50 UTC 2019 - Jan Engelhardt + +- Use noun phrase in summary. Trim history from description. + Fix wrong "it's". + +------------------------------------------------------------------- +Thu Aug 8 08:37:50 UTC 2019 - Thomas Bechtold + +- Capitalize summary to make rpmlint happy + +------------------------------------------------------------------- +Thu Aug 8 08:35:17 UTC 2019 - Thomas Bechtold + +- 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 + +- Fix fdupes call + +------------------------------------------------------------------- +Tue Dec 4 12:50:22 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Fri Nov 9 16:51:37 UTC 2018 - Thomas Bechtold + +- 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) diff --git a/python-metaextract.spec b/python-metaextract.spec new file mode 100644 index 0000000..4f4d837 --- /dev/null +++ b/python-metaextract.spec @@ -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 diff --git a/tests-tests_require.patch b/tests-tests_require.patch new file mode 100644 index 0000000..d6ccd43 --- /dev/null +++ b/tests-tests_require.patch @@ -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'} + ), + (