2008-09-18 02:45:36 +00:00
|
|
|
#
|
2011-01-11 13:17:03 +00:00
|
|
|
# spec file for package python-cssutils
|
2008-09-18 02:45:36 +00:00
|
|
|
#
|
2018-12-04 13:22:10 +00:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2008-09-18 02:45:36 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
2011-09-05 14:55:24 +00:00
|
|
|
|
2018-12-04 13:22:10 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-09-18 02:45:36 +00:00
|
|
|
#
|
|
|
|
|
|
2011-09-05 14:55:24 +00:00
|
|
|
|
2017-09-01 14:31:41 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
|
%define oldpython python
|
2008-09-18 02:45:36 +00:00
|
|
|
Name: python-cssutils
|
2017-05-02 22:47:29 +00:00
|
|
|
Version: 1.0.2
|
2012-03-12 20:48:02 +00:00
|
|
|
Release: 0
|
2011-09-02 09:35:26 +00:00
|
|
|
Summary: A CSS Cascading Style Sheets library for Python
|
2018-12-04 13:22:10 +00:00
|
|
|
License: LGPL-3.0-or-later
|
2011-09-02 09:35:26 +00:00
|
|
|
Group: Development/Languages/Python
|
2018-12-04 17:11:47 +00:00
|
|
|
URL: http://cthedot.de/cssutils/
|
2017-09-01 14:31:41 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/c/cssutils/cssutils-%{version}.tar.gz
|
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2018-12-04 17:11:47 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
|
Requires(postun): update-alternatives
|
2012-03-12 20:48:02 +00:00
|
|
|
BuildArch: noarch
|
2017-09-01 14:31:41 +00:00
|
|
|
%ifpython2
|
|
|
|
|
Provides: %{oldpython}-css-utils-doc = %{version}
|
|
|
|
|
Obsoletes: %{oldpython}-css-utils-doc < %{version}
|
2012-03-12 20:48:02 +00:00
|
|
|
%endif
|
2017-09-01 14:31:41 +00:00
|
|
|
%python_subpackages
|
2008-09-18 02:45:36 +00:00
|
|
|
|
|
|
|
|
%description
|
2011-09-02 09:35:26 +00:00
|
|
|
A Python package to parse and build CSS Cascading Style Sheets. DOM only, not any rendering facilities!
|
2008-09-18 02:45:36 +00:00
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n cssutils-%{version}
|
2011-09-02 09:35:26 +00:00
|
|
|
sed -i "1d" src/cssutils/{parse,codec,sac,serialize,scripts/csscapture,_codec2,errorhandler,scripts/cssparse,_codec3,scripts/csscombine,tokenize2,__init__}.py # Fix non-executable scripts
|
|
|
|
|
sed -i "s/\r//" src/cssutils/{sac,scripts/csscombine,tokenize2}.py COPYING COPYING.LESSER examples/{website,minify,imports,cssencodings,style,testutil,codec}.py # Fix EOL encodings
|
2008-09-18 02:45:36 +00:00
|
|
|
|
|
|
|
|
%build
|
2017-09-01 14:31:41 +00:00
|
|
|
%python_build
|
2008-09-18 02:45:36 +00:00
|
|
|
|
|
|
|
|
%install
|
2017-09-01 14:31:41 +00:00
|
|
|
%python_install
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/csscapture
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/csscombine
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/cssparse
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
%{python_install_alternative csscapture csscombine cssparse}
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%python_uninstall_alternative csscapture
|
2008-09-18 02:45:36 +00:00
|
|
|
|
2017-09-01 14:31:41 +00:00
|
|
|
%files %{python_files}
|
2018-12-04 17:11:47 +00:00
|
|
|
%license COPYING COPYING.LESSER
|
|
|
|
|
%doc README.txt examples
|
2017-09-01 14:31:41 +00:00
|
|
|
%python_alternative %{_bindir}/csscapture
|
|
|
|
|
%python_alternative %{_bindir}/csscombine
|
|
|
|
|
%python_alternative %{_bindir}/cssparse
|
2013-04-17 14:05:30 +00:00
|
|
|
%{python_sitelib}/cssutils-%{version}-py*.egg-info/
|
|
|
|
|
%{python_sitelib}/cssutils/
|
|
|
|
|
%{python_sitelib}/encutils/
|
2008-09-18 02:45:36 +00:00
|
|
|
|
|
|
|
|
%changelog
|