forked from pool/python-cssmin
Accepting request 989282 from home:apersaud:branches:devel:languages:python:flask
See also: https://build.opensuse.org/request/show/989224 (first attempt to submit to dlp:flask) - specfile: * update for newer python packaging * fix some rpm warnings OBS-URL: https://build.opensuse.org/request/show/989282 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cssmin?expand=0&rev=1
This commit is contained in:
62
python-cssmin.spec
Normal file
62
python-cssmin.spec
Normal file
@@ -0,0 +1,62 @@
|
||||
#
|
||||
# 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}
|
||||
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
|
||||
Reference in New Issue
Block a user