15
0

Accepting request 1003467 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1003467
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cssutils?expand=0&rev=32
This commit is contained in:
2022-09-14 11:45:14 +00:00
committed by Git OBS Bridge
5 changed files with 40 additions and 17 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a2fcf06467553038e98fea9cfe36af2bf14063eb147a70958cfcaa8f5786acaf
size 367038

3
cssutils-2.6.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f7dcd23c1cec909fdf3630de346e1413b7b2555936dec14ba2ebb9913bf0818e
size 723259

View File

@@ -1,3 +1,16 @@
-------------------------------------------------------------------
Fri Sep 9 08:34:38 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 2.0.6:
* [gh#jaraco/cssutils#14] Added support for custom CSS
variables with -- prefix.
- Generate a basic setup.py file in-place to use with
%%python_setup; upstream no longer supplies one.
- Use fdupes to link duplicate files.
- Add %{name}.rpmlintrc file to suppress errors about zero-length
files which are nevertheless required.
- Update URL to new upstream home.
-------------------------------------------------------------------
Tue Dec 4 12:47:04 UTC 2018 - Matej Cepl <mcepl@suse.com>

View File

@@ -0,0 +1,2 @@
# We need to keep these zero-length place-holder files for the examples to work
addFilter("zero-length")

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-cssutils
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,24 +17,22 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-cssutils
Version: 1.0.2
Version: 2.6.0
Release: 0
Summary: A CSS Cascading Style Sheets library for Python
License: LGPL-3.0-or-later
Group: Development/Languages/Python
URL: http://cthedot.de/cssutils/
Source: https://files.pythonhosted.org/packages/source/c/cssutils/cssutils-%{version}.tar.gz
URL: https://github.com/jaraco/cssutils
Source0: https://files.pythonhosted.org/packages/source/c/cssutils/cssutils-%{version}.tar.gz
Source1: %{name}.rpmlintrc
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%ifpython2
Provides: %{oldpython}-css-utils-doc = %{version}
Obsoletes: %{oldpython}-css-utils-doc < %{version}
%endif
%python_subpackages
%description
@@ -42,8 +40,16 @@ A Python package to parse and build CSS Cascading Style Sheets. DOM only, not an
%prep
%setup -q -n cssutils-%{version}
sed -i "1d" src/cssutils/{parse,codec,sac,serialize,scripts/csscapture,_codec2,errorhandler,scripts/cssparse,_codec3,scripts/csscombine,tokenize2,__init__}.py # Fix non-executable scripts
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
# SECTION Generate a basic setup.py as upstream only supplies setup.cfg
cat << EOF > setup.py
import setuptools
if __name__ == "__main__":
setuptools.setup()
EOF
# /SECTION
%build
%python_build
@@ -54,6 +60,8 @@ sed -i "s/\r//" src/cssutils/{sac,scripts/csscombine,tokenize2}.py COPYING COPYI
%python_clone -a %{buildroot}%{_bindir}/csscombine
%python_clone -a %{buildroot}%{_bindir}/cssparse
%python_expand %fdupes %{buildroot}%{$python_sitelib}/
%post
%{python_install_alternative csscapture csscombine cssparse}
@@ -62,11 +70,11 @@ sed -i "s/\r//" src/cssutils/{sac,scripts/csscombine,tokenize2}.py COPYING COPYI
%files %{python_files}
%license COPYING COPYING.LESSER
%doc README.txt examples
%doc README.rst examples
%python_alternative %{_bindir}/csscapture
%python_alternative %{_bindir}/csscombine
%python_alternative %{_bindir}/cssparse
%{python_sitelib}/cssutils-%{version}-py*.egg-info/
%{python_sitelib}/cssutils-%{version}-py%{python_version}.egg-info/
%{python_sitelib}/cssutils/
%{python_sitelib}/encutils/