2019-01-07 10:19:41 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-css-parser
|
|
|
|
#
|
2023-05-07 18:47:24 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2019-01-07 10:19:41 +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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2023-05-07 18:47:24 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-01-07 10:38:05 +00:00
|
|
|
Name: python-css-parser
|
2023-05-07 18:47:24 +00:00
|
|
|
Version: 1.0.9
|
2019-01-07 10:38:05 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: CSS related utilities (parsing, serialization, etc) for python
|
|
|
|
License: LGPL-3.0-or-later
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
URL: https://github.com/ebook-utils/css-parser
|
|
|
|
Source: https://github.com/ebook-utils/css-parser/archive/v%{version}/%{name}-%{version}.tar.gz
|
2023-05-07 18:47:24 +00:00
|
|
|
BuildRequires: %{python_module base >= 3.7}
|
2019-01-07 10:38:05 +00:00
|
|
|
BuildRequires: %{python_module chardet}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
Requires: python-chardet
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildArch: noarch
|
2019-01-07 10:19:41 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2019-01-07 10:38:05 +00:00
|
|
|
CSS related utilities (parsing, serialization, etc) for python
|
2019-01-07 10:19:41 +00:00
|
|
|
|
2022-01-26 01:55:25 +00:00
|
|
|
A fork of the cssutils project based on version 1.0.2. This fork
|
|
|
|
includes general bug fixes and extensions specific to editing and
|
2020-11-16 20:55:13 +00:00
|
|
|
working with ebooks.
|
2019-01-07 10:19:41 +00:00
|
|
|
|
2022-01-26 01:55:25 +00:00
|
|
|
The main python source code has been modified so that it will run
|
|
|
|
without further conversion on both Python >= 2.7 and Python 3.X without
|
|
|
|
any further modules required. All required modifications are handled
|
2020-11-16 20:55:13 +00:00
|
|
|
local to each file
|
2019-01-07 10:19:41 +00:00
|
|
|
|
|
|
|
%prep
|
2022-01-26 01:55:25 +00:00
|
|
|
%autosetup -p1 -n css-parser-%{version}
|
|
|
|
|
2019-01-07 10:19:41 +00:00
|
|
|
sed -i "1d" src/css_parser/{parse,codec,sac,serialize,scripts/csscapture,_codec2,errorhandler,scripts/cssparse,_codec3,scripts/csscombine,tokenize2,version,encutils/__init__,__init__}.py # Fix non-executable scripts
|
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2019-06-04 14:06:43 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2019-01-07 10:19:41 +00:00
|
|
|
|
2019-01-07 10:38:05 +00:00
|
|
|
%check
|
2020-11-16 20:55:13 +00:00
|
|
|
%pyunittest -v
|
2019-01-07 10:38:05 +00:00
|
|
|
|
2019-01-07 10:19:41 +00:00
|
|
|
%files %{python_files}
|
|
|
|
%license COPYING COPYING.LESSER
|
|
|
|
%doc README.md
|
2020-11-16 20:55:13 +00:00
|
|
|
%{python_sitelib}/css_parser
|
|
|
|
%{python_sitelib}/css_parser-%{version}*-info/
|
2019-01-07 10:19:41 +00:00
|
|
|
|
|
|
|
%changelog
|