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/