From b1eea2bdd6297e956a769228f1c2f0dbb0ca8cf0fa55de97bb569baada31ec27 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 1 Mar 2024 01:33:57 +0000 Subject: [PATCH] - Switch to autosetup, pyproject and pytest macros. - No more greedy globs in %files. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-kitchen?expand=0&rev=18 --- python-kitchen.changes | 6 ++++++ python-kitchen.spec | 25 +++++++++---------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/python-kitchen.changes b/python-kitchen.changes index 706c797..a20bddc 100644 --- a/python-kitchen.changes +++ b/python-kitchen.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 1 01:33:11 UTC 2024 - Steve Kowalik + +- Switch to autosetup, pyproject and pytest macros. +- No more greedy globs in %files. + ------------------------------------------------------------------- Mon Mar 21 21:13:49 UTC 2022 - Matej Cepl diff --git a/python-kitchen.spec b/python-kitchen.spec index f7c28bc..20a720b 100644 --- a/python-kitchen.spec +++ b/python-kitchen.spec @@ -1,7 +1,7 @@ # # spec file for package python-kitchen # -# Copyright (c) 2022 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,18 +16,18 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-kitchen Version: 1.2.6 Release: 0 Summary: Kitchen contains a cornucopia of useful code License: LGPL-2.1-or-later -Group: Development/Languages/Python URL: https://github.com/fedora-infra/kitchen/ Source: https://files.pythonhosted.org/packages/source/k/kitchen/kitchen-%{version}.tar.gz # https://github.com/fedora-infra/kitchen/pull/33 Patch0: python-kitchen-remove-nose.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch @@ -40,32 +40,25 @@ BuildRequires: %{python_module pytest} A bunch of useful python functions to be used in other projects. %prep -%setup -q -n kitchen-%{version} -%patch0 -p1 +%autosetup -p1 -n kitchen-%{version} sed -i '1s/^#!.*//' kitchen2/kitchen/pycompat24/base64/_base64.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check export LANG='en_US.UTF8' -%{python_expand # run test -%if "$python" == "python2" -pushd kitchen2 -%else pushd kitchen3 -%endif -# skips because of gh#fedora-infra/kitchen#29 and gh#fedora-infra/kitchen#37 -$python -m pytest -k 'not (test_internal_generate_combining_table or test_easy_gettext_setup_non_unicode or test_invalid_fallback_no_raise or test_lgettext or test_lngettext)' -popd} +%pytest -k 'not (test_internal_generate_combining_table or test_easy_gettext_setup_non_unicode or test_invalid_fallback_no_raise or test_lgettext or test_lngettext)' %files %{python_files} %license COPYING COPYING.LESSER %doc NEWS.rst README.rst -%{python_sitelib}/* +%{python_sitelib}/kitchen +%{python_sitelib}/kitchen-%{version}.dist-info %changelog