forked from pool/python-css-parser
Accepting request 848970 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/848970 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-css-parser?expand=0&rev=3
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
Index: css-parser-1.0.4/css_parser_tests/test_errorhandler.py
|
||||
===================================================================
|
||||
--- css-parser-1.0.4.orig/css_parser_tests/test_errorhandler.py
|
||||
+++ css-parser-1.0.4/css_parser_tests/test_errorhandler.py
|
||||
@@ -99,13 +99,6 @@ class ErrorHandlerTestCase(basetest.Base
|
||||
self.assertEqual(s.getvalue(),
|
||||
'ERROR Property: Invalid value for "CSS Level 2.1" property: 1 [1:5: color]\n')
|
||||
|
||||
- s = self._setHandler()
|
||||
-
|
||||
- css_parser.log.setLevel(logging.ERROR)
|
||||
- css_parser.parseUrl('http://example.com')
|
||||
- self.assertEqual(s.getvalue()[:38],
|
||||
- 'ERROR Expected "text/css" mime type')
|
||||
-
|
||||
def test_parsevalidation(self):
|
||||
style = 'color: 1'
|
||||
t = 'a { %s }' % style
|
||||
Index: css-parser-1.0.4/css_parser_tests/test_parse.py
|
||||
===================================================================
|
||||
--- css-parser-1.0.4.orig/css_parser_tests/test_parse.py
|
||||
+++ css-parser-1.0.4/css_parser_tests/test_parse.py
|
||||
@@ -4,6 +4,7 @@ from __future__ import absolute_import,
|
||||
|
||||
import sys
|
||||
import xml.dom
|
||||
+import unittest
|
||||
|
||||
import css_parser
|
||||
|
||||
@@ -83,6 +84,7 @@ class CSSParserTestCase(basetest.BaseTes
|
||||
p.parseString(css).cssText,
|
||||
'/*1*/\na {\n color: /*2*/ red\n }'.encode())
|
||||
|
||||
+ @unittest.skip('online test')
|
||||
def test_parseUrl(self):
|
||||
"CSSParser.parseUrl()"
|
||||
parser = css_parser.CSSParser()
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ccfa62d56ccb892bd89f26926142692998db7757b691929c181af350d77c2c45
|
||||
size 349089
|
||||
3
python-css-parser-1.0.6.tar.gz
Normal file
3
python-css-parser-1.0.6.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:64916bc4030a339daf22f98c54e20d1e1bb4a8b7a15ccd2fd20771c49c3f7f4e
|
||||
size 349671
|
||||
@@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 14 19:59:27 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to version 1.0.6
|
||||
* no changelog provided
|
||||
- Remove deprecated setup.py tests, use %pyunittest instead. The
|
||||
custom run_tests.py is just a stdlib unittest wrapper.
|
||||
- Drop disable-online-tests.patch -- The tests handle the offline
|
||||
case fine now.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 4 14:06:32 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-css-parser
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,14 +18,13 @@
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-css-parser
|
||||
Version: 1.0.4
|
||||
Version: 1.0.6
|
||||
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
|
||||
Patch0: disable-online-tests.patch
|
||||
BuildRequires: %{python_module chardet}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
Requires: python-chardet
|
||||
@@ -37,14 +36,18 @@ BuildArch: noarch
|
||||
%description
|
||||
CSS related utilities (parsing, serialization, etc) for python
|
||||
|
||||
A fork of the cssutils project based on version 1.0.2. This fork includes general bug fixes and extensions specific to editing and working with ebooks.
|
||||
A fork of the cssutils project based on version 1.0.2. This fork
|
||||
includes general bug fixes and extensions specific to editing and
|
||||
working with ebooks.
|
||||
|
||||
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 local to each file
|
||||
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
|
||||
local to each file
|
||||
|
||||
%prep
|
||||
%setup -q -n css-parser-%{version}
|
||||
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
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@@ -54,13 +57,12 @@ sed -i "1d" src/css_parser/{parse,codec,sac,serialize,scripts/csscapture,_codec2
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%python_exec setup.py test
|
||||
%pyunittest -v
|
||||
|
||||
%files %{python_files}
|
||||
%license COPYING COPYING.LESSER
|
||||
%doc README.md
|
||||
%{python_sitelib}/css_parser/
|
||||
%{python_sitelib}/css_parser-%{version}-py*.egg-info/
|
||||
%pycache_only %{python_sitelib}/css_parser/__pycache__/version.*
|
||||
%{python_sitelib}/css_parser
|
||||
%{python_sitelib}/css_parser-%{version}*-info/
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user