2015-11-09 10:57:44 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-webcolors
|
|
|
|
|
#
|
2018-12-04 14:13:42 +00:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2015-11-09 10:57:44 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2018-12-04 14:13:42 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
|
#
|
2015-11-09 10:57:44 +00:00
|
|
|
|
|
|
|
|
|
2017-04-19 19:52:01 +00:00
|
|
|
%bcond_without tests
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
|
Name: python-webcolors
|
|
|
|
|
Version: 1.7
|
2015-11-09 10:57:44 +00:00
|
|
|
Release: 0
|
2017-04-19 19:52:01 +00:00
|
|
|
Summary: Support for color names and value formats defined by the HTML
|
2018-12-04 14:13:42 +00:00
|
|
|
License: BSD-3-Clause
|
2015-11-09 10:57:44 +00:00
|
|
|
Group: Development/Languages/Python
|
2018-12-04 14:13:42 +00:00
|
|
|
Url: https://github.com/ubernostrum/webcolors
|
2017-04-19 19:52:01 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/w/webcolors/webcolors-%{version}.tar.gz
|
2018-12-04 14:13:42 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-04-19 19:52:01 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2015-11-09 10:57:44 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
BuildArch: noarch
|
2017-04-19 19:52:01 +00:00
|
|
|
%python_subpackages
|
2015-11-09 10:57:44 +00:00
|
|
|
|
|
|
|
|
%description
|
2017-04-19 19:52:01 +00:00
|
|
|
Webcolors is a simple Python module for working with HTML/CSS
|
|
|
|
|
color definitions.
|
|
|
|
|
|
|
|
|
|
Support is included for normalizing and converting between the
|
|
|
|
|
following formats (RGB colorspace only; conversion to/from HSL can be
|
|
|
|
|
handled by the ``colorsys`` module in the Python standard library):
|
|
|
|
|
|
|
|
|
|
* Specification-defined color names
|
|
|
|
|
* Six-digit hexadecimal
|
|
|
|
|
* Three-digit hexadecimal
|
|
|
|
|
* Integer ``rgb()`` triplet
|
|
|
|
|
* Percentage ``rgb()`` triplet
|
|
|
|
|
|
|
|
|
|
Implementations are also provided for the HTML5 color parsing and
|
|
|
|
|
serialization algorithms.
|
|
|
|
|
|
|
|
|
|
Full documentation is `available online <http://webcolors.readthedocs.org/>`_.
|
2015-11-09 10:57:44 +00:00
|
|
|
|
|
|
|
|
%prep
|
2017-04-19 19:52:01 +00:00
|
|
|
%setup -q -n webcolors-%{version}
|
2015-11-09 10:57:44 +00:00
|
|
|
|
|
|
|
|
%build
|
2017-04-19 19:52:01 +00:00
|
|
|
%python_build
|
2015-11-09 10:57:44 +00:00
|
|
|
|
|
|
|
|
%install
|
2017-04-19 19:52:01 +00:00
|
|
|
%python_install
|
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%check
|
|
|
|
|
%python_exec -m unittest discover
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%doc LICENSE README.rst
|
|
|
|
|
%{python_sitelib}/*
|
2015-11-09 10:57:44 +00:00
|
|
|
|
|
|
|
|
%changelog
|