From fabc7b4ab9e2f2384e042fb68fea507cce4ad587c05eeb3355ac957f9077206c Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Fri, 1 Sep 2017 14:31:41 +0000 Subject: [PATCH] Accepting request 519965 from devel:languages:python:singlespec-staging - singlespec auto-conversion - update to version 1.0.2: * Fixed issue #61: Nesting of `@media` rules * Fixed issue #51 and #56: Slow font-family regex * Fixed issue #68: failing tests on Python 3 * Fixed issue #69: our DOM implementation now delegates unsupported methods * Fixed issue #72: importing now faster since regexes are no longer pre-cached on import time - update to version 1.0.1: * Fixed Python 3.5 compatibility - update to version 1.0: * EXPERIMENTAL: Variable references may have a fallback value now (as implemented in Firefox 29). It is available as CSSVariable.fallback and example are: * FEATURE: (issue #37) Implemented parsing of CSSCalc values. General syntax is checked but not if operators in calc are actually the right kind like DIMENSION * DIMENSION. Also Values using calc do not validate in cssutils but are actually valid. * FIXED issue #20 and #35 (Test fail CSSParser.parseUrl() error with Python 3.3) * FIXED issue #21: (almost all) deprecation warning in Py 3.3 fixed. * FIXED issue #30 (Test failed) * FIXED issue #33 (well kinda): Added that cssutils is **not** threadsafe! * FIXED issue #34: More complext MediaQueries should be parsable now. A few slight changes in behavior are: - xml.dom.SyntaxErr raised instead of xml.dom.InvalidCharacterErr for an unknown media type - removed handheld media type special case (for old Opera). - Require python-setuptools instead of distribute (upstreams merged) - Update to version 0.9.10: * No changelog provided - Remove BuildRequires: python-2to3, useless since included in main python devel package - Add Requires: python3; fix build for OpenSUSE <= 12.2 - Initial python3 support - Update to version 9.9.9: * No changelog provided - Obsolete/Provide python-cssutils-doc - Update to version 0.9.8a3: * No HTML docs anymore - Spec file cleanup - Update to version 0.9.8a1 * BUGFIX: fixes issue #41, #42, #45, #46 - Update to 0.9.7b4 * improves parsing of MS specific (and probably invalid!) values - Make package own the documentation subdir. - Mark documentation as such. - update to 0.9.7b3 - several changes (see CHANGELOG.txt), just random picks: * Massive speed improvement of handling of CSSVariables of a stylesheet * CSSFunction value parameters may contain HASH values like ``#fff`` now * Changed parameters of script/utility function ``csscombine``. - sphinx conf no longer provided - Update to 0.9.7a4 - cleanup spec file - api changes: * CSSRule values changed: NAMESPACE_RULE, COMMENT, VARIABLES_RULE * CSSStyleSheet.setSerializer and CSSStyleSheet.setSerializerPref DEPRECATED - compliance to http://dev.w3.org/csswg/cssom improved. - new features: * Started CSS Variables * added cssutils.css.CSSStyleSheet.variables * cssutils.ser.prefs.resolveVariables switchable * cssutils.ser.prefs.normalizedVarNames switchable * Added new options to cssutils.script.csscombine: cssText=None, href=None * Added CSSRuleList.rulesOfType(type) - Update to 0.9.7a3 as needed for FATE#309541 - Added build requirement for python-sphinx - Added patch for copy.py (sphinx documentation) - Rebuild HTML documentation with sphinx - Better separate documentation package from main package - Initial package. OBS-URL: https://build.opensuse.org/request/show/519965 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cssutils?expand=0&rev=44 --- python-cssutils.changes | 6 ++++++ python-cssutils.spec | 43 +++++++++++++++++++++++++++-------------- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/python-cssutils.changes b/python-cssutils.changes index 70b1d50..e0c7098 100644 --- a/python-cssutils.changes +++ b/python-cssutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 24 13:35:14 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + ------------------------------------------------------------------- Tue May 2 22:15:14 UTC 2017 - thorsten.behrens@cib.de @@ -140,3 +145,4 @@ Mon Apr 28 17:50:55 CEST 2008 - pth@suse.de - Initial package. + diff --git a/python-cssutils.spec b/python-cssutils.spec index acd1acd..f1209b7 100644 --- a/python-cssutils.spec +++ b/python-cssutils.spec @@ -16,25 +16,27 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define oldpython python Name: python-cssutils Version: 1.0.2 Release: 0 -Url: http://cthedot.de/cssutils/ Summary: A CSS Cascading Style Sheets library for Python License: LGPL-3.0+ Group: Development/Languages/Python -Source: https://pypi.python.org/packages/source/c/cssutils/cssutils-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRequires: unzip -Provides: python-css-utils-doc = %{version} -Obsoletes: python-css-utils-doc < %{version} -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else +Url: http://cthedot.de/cssutils/ +Source: https://files.pythonhosted.org/packages/source/c/cssutils/cssutils-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros BuildArch: noarch +%ifpython2 +Provides: %{oldpython}-css-utils-doc = %{version} +Obsoletes: %{oldpython}-css-utils-doc < %{version} %endif +Requires(post): update-alternatives +Requires(postun): update-alternatives +%python_subpackages %description A Python package to parse and build CSS Cascading Style Sheets. DOM only, not any rendering facilities! @@ -45,15 +47,26 @@ sed -i "1d" src/cssutils/{parse,codec,sac,serialize,scripts/csscapture,_codec2,e 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 %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_clone -a %{buildroot}%{_bindir}/csscapture +%python_clone -a %{buildroot}%{_bindir}/csscombine +%python_clone -a %{buildroot}%{_bindir}/cssparse -%files +%post +%{python_install_alternative csscapture csscombine cssparse} + +%postun +%python_uninstall_alternative csscapture + +%files %{python_files} %defattr(-,root,root,-) %doc COPYING COPYING.LESSER README.txt examples -%{_bindir}/css* +%python_alternative %{_bindir}/csscapture +%python_alternative %{_bindir}/csscombine +%python_alternative %{_bindir}/cssparse %{python_sitelib}/cssutils-%{version}-py*.egg-info/ %{python_sitelib}/cssutils/ %{python_sitelib}/encutils/