From 7b46856b45e2e063c4813b7fc6f8c8d827d1809f901b39f96ceeaacf5d498197 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 29 Feb 2024 04:17:33 +0000 Subject: [PATCH] - Switch to autosetup and pyproject macros. - No more greedy globs in %files. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-duckduckgo2?expand=0&rev=7 --- python-duckduckgo2.changes | 6 ++++++ python-duckduckgo2.spec | 17 +++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/python-duckduckgo2.changes b/python-duckduckgo2.changes index 2a73e0f..32109c9 100644 --- a/python-duckduckgo2.changes +++ b/python-duckduckgo2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 29 04:16:58 UTC 2024 - Steve Kowalik + +- Switch to autosetup and pyproject macros. +- No more greedy globs in %files. + ------------------------------------------------------------------- Tue May 26 07:22:46 UTC 2020 - Petr Gajdos diff --git a/python-duckduckgo2.spec b/python-duckduckgo2.spec index 0aeab5e..f13dd05 100644 --- a/python-duckduckgo2.spec +++ b/python-duckduckgo2.spec @@ -1,7 +1,7 @@ # # spec file for package python-duckduckgo2 # -# Copyright (c) 2020 SUSE LLC +# 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 @@ -16,17 +16,17 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-duckduckgo2 Version: 0.242 Release: 0 Summary: Library for querying the DuckDuckGo API License: BSD-3-Clause -Group: Development/Languages/Python URL: https://github.com/crazedpsyc/python-duckduckgo/ Source: https://files.pythonhosted.org/packages/source/d/duckduckgo2/duckduckgo2-%{version}.tar.gz Patch0: add-python3-support.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires(post): update-alternatives @@ -38,14 +38,13 @@ BuildArch: noarch A Python library for querying the DuckDuckGo API. %prep -%setup -q -n duckduckgo2-%{version} -%patch0 -p1 +%autosetup -p1 -n duckduckgo2-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/ddg %python_expand %fdupes %{buildroot}%{$python_sitelib} @@ -59,6 +58,8 @@ A Python library for querying the DuckDuckGo API. %doc README.rst %license LICENSE %python_alternative %{_bindir}/ddg -%{python_sitelib}/* +%{python_sitelib}/duckduckgo.py +%pycache_only %{python_sitelib}/__pycache__/duckduckgo.*.py* +%{python_sitelib}/duckduckgo2-%{version}.dist-info %changelog