Files
python-cssmin/python-cssmin.spec
Matej Cepl 809b8bd156 Accepting request 989793 from home:apersaud:branches:devel:languages:python
not sure why this didn't results in error in the original submit. The package was building successfully for all repos before I submitted, but I guess it shouldn't have? It builds now for all repos that are enabled after the branching, so I hope that's things are OK

- specfile:
  * fix build: include python-rpm-macros and python-packaging

OBS-URL: https://build.opensuse.org/request/show/989793
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cssmin?expand=0&rev=2
2022-07-18 13:06:00 +00:00

65 lines
2.0 KiB
RPMSpec

#
# spec file for package python-cssmin
#
# Copyright (c) 2022 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-cssmin
Version: 0.2.0
Release: 0
Url: http://github.com/zacharyvoase/cssmin
Summary: A Python port of the YUI CSS compression algorithm
License: MIT and BSD-3-Clause
Group: Development/Languages/Python
Source: http://pypi.python.org/packages/source/c/cssmin/cssmin-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module packaging}
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
This is a Python port of the YUI CSS Compressor.
%prep
%setup -q -n cssmin-%{version}
%build
%python_build
%install
%python_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
%post
%python_install_alternative cssmin
%postun
%python_uninstall_alternative cssmin
%files %{python_files}
%defattr(-,root,root,-)
%python_alternative %{_bindir}/cssmin
%{python_sitelib}/cssmin.py*
%{python_sitelib}/cssmin-%{version}-py*.egg-info
%pycache_only %{python_sitelib}/__pycache__
%changelog