From 3abd0b20ed41061c0f2f9d48fec65a08927b55048d3afd16fcbbaf5dc8cadbed Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 13 Jun 2025 02:57:29 +0000 Subject: [PATCH] - Switch to pyproject macros. - Use fdupes. - No more greedy globs in %files. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wikipedia?expand=0&rev=11 --- .gitattributes | 23 ++++++++++++++ .gitignore | 1 + python-wikipedia.changes | 28 +++++++++++++++++ python-wikipedia.spec | 68 ++++++++++++++++++++++++++++++++++++++++ wikipedia-1.4.0.tar.gz | 3 ++ 5 files changed, 123 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-wikipedia.changes create mode 100644 python-wikipedia.spec create mode 100644 wikipedia-1.4.0.tar.gz 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/python-wikipedia.changes b/python-wikipedia.changes new file mode 100644 index 0000000..e3aa3a2 --- /dev/null +++ b/python-wikipedia.changes @@ -0,0 +1,28 @@ +------------------------------------------------------------------- +Fri Jun 13 02:45:35 UTC 2025 - Steve Kowalik + +- Switch to pyproject macros. +- Use fdupes. +- No more greedy globs in %files. + +------------------------------------------------------------------- +Fri May 29 10:59:02 UTC 2020 - Marketa Calabkova + +- Replace nose with pytest + +------------------------------------------------------------------- +Tue Dec 4 12:56:05 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Thu Aug 24 13:57:39 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + +------------------------------------------------------------------- +Tue Apr 12 23:12:21 UTC 2016 - badshah400@gmail.com + +- Initial package. + + diff --git a/python-wikipedia.spec b/python-wikipedia.spec new file mode 100644 index 0000000..0df25a5 --- /dev/null +++ b/python-wikipedia.spec @@ -0,0 +1,68 @@ +# +# spec file for package python-wikipedia +# +# Copyright (c) 2025 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/ +# + + +Name: python-wikipedia +Version: 1.4.0 +Release: 0 +Summary: Wikipedia API for Python +License: MIT +URL: https://github.com/goldsmith/Wikipedia +Source: https://files.pythonhosted.org/packages/source/w/wikipedia/wikipedia-%{version}.tar.gz +BuildRequires: %{python_module beautifulsoup4} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module requests} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-beautifulsoup4 +Requires: python-requests +BuildArch: noarch +%python_subpackages + +%description +Wikipedia is a Python library that makes it easy to access and parse +data from Wikipedia. + +Search Wikipedia, get article summaries, get data like links and images +from a page, and more. Wikipedia wraps the `MediaWiki +API `__ so you can focus on using +Wikipedia data, not getting it. + +%prep +%setup -q -n wikipedia-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +ln -s tests/request_mock_data.py . +%pytest + +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitelib}/wikipedia +%{python_sitelib}/wikipedia-%{version}.dist-info + +%changelog diff --git a/wikipedia-1.4.0.tar.gz b/wikipedia-1.4.0.tar.gz new file mode 100644 index 0000000..3e02df5 --- /dev/null +++ b/wikipedia-1.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db0fad1829fdd441b1852306e9856398204dc0786d2996dd2e0c8bb8e26133b2 +size 27748