File python-cssmin.spec of Package python-cssmin

# spec file for package python-cssmin
# Copyright (c) 2022 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-cssmin
Version:        0.2.0
Release:        0
Summary:        YUI CSS compression algorithm
License:        BSD-3-Clause AND MIT
Group:          Development/Languages/Python
BuildRequires:  %{python_module packaging}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires(post): update-alternatives
BuildArch:      noarch

This is a Python port of the YUI CSS Compressor.

%setup -q -n cssmin-%{version}


%{python_expand chmod a+x %{buildroot}%{$python_sitelib}/
sed -i "s|^#!.*env python$|#!%{__$python}|" %{buildroot}%{$python_sitelib}/
%python_clone -a %{buildroot}%{_bindir}/cssmin
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%python_install_alternative cssmin

%python_uninstall_alternative cssmin

%files %{python_files}
%python_alternative %{_bindir}/cssmin
%pycache_only %{python_sitelib}/__pycache__

openSUSE Build Service is sponsored by