From 770cd65af53af2cbfbe179bc385c733d3218a80295d03ac0af67348ab43e6f35 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 13 Mar 2024 01:45:37 +0000 Subject: [PATCH] - Switch to autosetup, pyproject and pytest macros. - No more greedy globs in %files. - Skip a broken test. - Add rpmlintrc to silence a false positive. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pywal?expand=0&rev=4 --- python-pywal.changes | 8 ++++++++ python-pywal.rpmlintrc | 4 ++++ python-pywal.spec | 21 ++++++++++++++------- 3 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 python-pywal.rpmlintrc diff --git a/python-pywal.changes b/python-pywal.changes index fb78434..a8806b1 100644 --- a/python-pywal.changes +++ b/python-pywal.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Mar 13 01:45:20 UTC 2024 - Steve Kowalik + +- Switch to autosetup, pyproject and pytest macros. +- No more greedy globs in %files. +- Skip a broken test. +- Add rpmlintrc to silence a false positive. + ------------------------------------------------------------------- Thu Jan 7 10:15:02 UTC 2021 - Markéta Machová diff --git a/python-pywal.rpmlintrc b/python-pywal.rpmlintrc new file mode 100644 index 0000000..36277f4 --- /dev/null +++ b/python-pywal.rpmlintrc @@ -0,0 +1,4 @@ +# The devel files identified by rpmlint are required for +# pywal, it does not make sense to put them in a separate +# devel package +addFilter("devel-file-in-non-devel-package") diff --git a/python-pywal.spec b/python-pywal.spec index 515fab0..1fbf953 100644 --- a/python-pywal.spec +++ b/python-pywal.spec @@ -1,7 +1,7 @@ # # spec file for package python-pywal # -# Copyright (c) 2021 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,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pywal Version: 3.3.0 Release: 0 @@ -24,11 +23,17 @@ Summary: Generate and change color-schemes on the fly License: MIT URL: https://github.com/dylanaraps/pywal Source: https://files.pythonhosted.org/packages/source/p/pywal/pywal-%{version}.tar.gz +Source1: python-pywal.rpmlintrc +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: ImageMagick BuildRequires: fdupes BuildRequires: python-rpm-macros Recommends: ImageMagick +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -36,18 +41,19 @@ BuildArch: noarch Generate and change color-schemes on the fly %prep -%setup -q -n pywal-%{version} +%autosetup -p1 -n pywal-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/wal %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%pyunittest +# Forbidden by imagemagick's security policy +%pytest -k 'not test_gen_colors' %post %python_install_alternative wal @@ -59,6 +65,7 @@ Generate and change color-schemes on the fly %doc README.md %license LICENSE.md %python_alternative %{_bindir}/wal -%{python_sitelib}/* +%{python_sitelib}/pywal +%{python_sitelib}/pywal-%{version}.dist-info %changelog