From 1015da7541e2a0336631ed998193fb84b53ede5788433bec8c46bec8a42716ca Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 6 Nov 2024 14:46:25 +0000 Subject: [PATCH] - Clean up the SPEC file. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cssmin?expand=0&rev=5 --- python-cssmin.changes | 5 +++++ python-cssmin.spec | 20 ++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/python-cssmin.changes b/python-cssmin.changes index fbff04a..3f79160 100644 --- a/python-cssmin.changes +++ b/python-cssmin.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Nov 6 14:46:18 UTC 2024 - Matej Cepl + +- Clean up the SPEC file. + ------------------------------------------------------------------- Mon Jul 18 13:21:32 UTC 2022 - Matej Cepl diff --git a/python-cssmin.spec b/python-cssmin.spec index 1837db1..3389c09 100644 --- a/python-cssmin.spec +++ b/python-cssmin.spec @@ -1,7 +1,7 @@ # # spec file for package python-cssmin # -# 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,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-cssmin Version: 0.2.0 Release: 0 @@ -26,11 +25,13 @@ Group: Development/Languages/Python URL: https://github.com/zacharyvoase/cssmin Source: https://files.pythonhosted.org/packages/source/c/cssmin/cssmin-%{version}.tar.gz BuildRequires: %{python_module packaging} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -38,19 +39,22 @@ BuildArch: noarch This is a Python port of the YUI CSS Compressor. %prep -%setup -q -n cssmin-%{version} +%autosetup -p1 -n cssmin-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %{python_expand chmod a+x %{buildroot}%{$python_sitelib}/cssmin.py sed -i "s|^#!.*env python$|#!%{__$python}|" %{buildroot}%{$python_sitelib}/cssmin.py } %python_clone -a %{buildroot}%{_bindir}/cssmin %python_expand %fdupes %{buildroot}%{$python_sitelib} +%check +# Good upstream have never even heard about the idea of tests + %post %python_install_alternative cssmin @@ -59,8 +63,8 @@ sed -i "s|^#!.*env python$|#!%{__$python}|" %{buildroot}%{$python_sitelib}/cssmi %files %{python_files} %python_alternative %{_bindir}/cssmin -%{python_sitelib}/cssmin.py* -%{python_sitelib}/cssmin-%{version}-py*.egg-info +%{python_sitelib}/cssmin.py +%{python_sitelib}/cssmin-%{version}*-info %pycache_only %{python_sitelib}/__pycache__ %changelog