From ced69b50828bb95c0ae8768f0ba3bca1747c309635b308c6710a166563eaa033 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Mon, 7 Jan 2019 10:19:41 +0000 Subject: [PATCH] Accepting request 663314 from home:ecsos New package. Version 1.0.4 It is needed for new calibre >= 3.37.0. OBS-URL: https://build.opensuse.org/request/show/663314 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-css-parser?expand=0&rev=1 --- .gitattributes | 23 ++++++++++++ .gitignore | 1 + python-css-parser-1.0.4.tar.gz | 3 ++ python-css-parser.changes | 4 +++ python-css-parser.spec | 66 ++++++++++++++++++++++++++++++++++ 5 files changed, 97 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-css-parser-1.0.4.tar.gz create mode 100644 python-css-parser.changes create mode 100644 python-css-parser.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-css-parser-1.0.4.tar.gz b/python-css-parser-1.0.4.tar.gz new file mode 100644 index 0000000..47b2d72 --- /dev/null +++ b/python-css-parser-1.0.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccfa62d56ccb892bd89f26926142692998db7757b691929c181af350d77c2c45 +size 349089 diff --git a/python-css-parser.changes b/python-css-parser.changes new file mode 100644 index 0000000..588aa72 --- /dev/null +++ b/python-css-parser.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Sat Jan 5 11:55:32 UTC 2019 - ecsos@opensuse.org + +- Initial version 1.0.4 diff --git a/python-css-parser.spec b/python-css-parser.spec new file mode 100644 index 0000000..3c0845b --- /dev/null +++ b/python-css-parser.spec @@ -0,0 +1,66 @@ +# +# spec file for package python-css-parser +# +# Copyright (c) 2018 SUSE LINUX 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 https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define oldpython python + +Name: python-css-parser +Version: 1.0.4 +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 +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros +BuildRequires: fdupes +BuildArch: noarch +%ifpython2 +Provides: %{oldpython}-css-parser-doc = %{version} +Obsoletes: %{oldpython}-css-parser-doc < %{version} +%endif +%python_subpackages + +%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. + +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 + +%build +%python_build + +%install +%python_install +# replace duplicate .pyo/.pyc with hardlinks +%fdupes %{buildroot}/%{python_sitelib}/css_parser/ + +%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.* + +%changelog