1
0
forked from pool/python-cssmin

Compare commits

4 Commits

2 changed files with 25 additions and 13 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Tue Jul 8 08:08:09 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Wed Nov 6 14:46:18 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Clean up the SPEC file.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jul 18 13:21:32 UTC 2022 - Matej Cepl <mcepl@suse.com> Mon Jul 18 13:21:32 UTC 2022 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-cssmin # spec file for package python-cssmin
# #
# Copyright (c) 2022 SUSE LLC # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,7 @@
# #
%{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without libalternatives
Name: python-cssmin Name: python-cssmin
Version: 0.2.0 Version: 0.2.0
Release: 0 Release: 0
@@ -26,11 +26,13 @@ Group: Development/Languages/Python
URL: https://github.com/zacharyvoase/cssmin URL: https://github.com/zacharyvoase/cssmin
Source: https://files.pythonhosted.org/packages/source/c/cssmin/cssmin-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/c/cssmin/cssmin-%{version}.tar.gz
BuildRequires: %{python_module packaging} BuildRequires: %{python_module packaging}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires(post): update-alternatives Requires: alts
Requires(postun):update-alternatives
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
@@ -38,29 +40,29 @@ BuildArch: noarch
This is a Python port of the YUI CSS Compressor. This is a Python port of the YUI CSS Compressor.
%prep %prep
%setup -q -n cssmin-%{version} %autosetup -p1 -n cssmin-%{version}
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%{python_expand chmod a+x %{buildroot}%{$python_sitelib}/cssmin.py %{python_expand chmod a+x %{buildroot}%{$python_sitelib}/cssmin.py
sed -i "s|^#!.*env python$|#!%{__$python}|" %{buildroot}%{$python_sitelib}/cssmin.py sed -i "s|^#!.*env python$|#!%{__$python}|" %{buildroot}%{$python_sitelib}/cssmin.py
} }
%python_clone -a %{buildroot}%{_bindir}/cssmin %python_clone -a %{buildroot}%{_bindir}/cssmin
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%post %check
%python_install_alternative cssmin # Good upstream have never even heard about the idea of tests
%postun %pre
%python_uninstall_alternative cssmin %python_libalternatives_reset_alternative cssmin
%files %{python_files} %files %{python_files}
%python_alternative %{_bindir}/cssmin %python_alternative %{_bindir}/cssmin
%{python_sitelib}/cssmin.py* %{python_sitelib}/cssmin.py
%{python_sitelib}/cssmin-%{version}-py*.egg-info %{python_sitelib}/cssmin-%{version}*-info
%pycache_only %{python_sitelib}/__pycache__ %pycache_only %{python_sitelib}/__pycache__
%changelog %changelog