summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-webcolors.spec195
-rw-r--r--sources1
3 files changed, 197 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..0b30a1c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/webcolors-1.12.tar.gz
diff --git a/python-webcolors.spec b/python-webcolors.spec
new file mode 100644
index 0000000..2aa56ad
--- /dev/null
+++ b/python-webcolors.spec
@@ -0,0 +1,195 @@
+%global _empty_manifest_terminate_build 0
+Name: python-webcolors
+Version: 1.12
+Release: 1
+Summary: A library for working with color names and color values formats defined by HTML and CSS.
+License: BSD 3-Clause
+URL: https://github.com/ubernostrum/webcolors
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/5f/f5/004dabd8f86abe0e770df4bcde8baf658709d3ebdd4d8fa835f6680012bb/webcolors-1.12.tar.gz
+BuildArch: noarch
+
+
+%description
+.. -*-restructuredtext-*-
+
+.. image:: https://github.com/ubernostrum/webcolors/workflows/CI/badge.svg
+ :alt: CI status image
+ :target: https://github.com/ubernostrum/webcolors/actions?query=workflow%3ACI
+
+``webcolors`` is a 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
+
+For example:
+
+.. code-block:: python
+
+ >>> import webcolors
+ >>> webcolors.hex_to_name(u'#daa520')
+ u'goldenrod'
+
+Implementations are also provided for the HTML5 color parsing and
+serialization algorithms. For example, parsing the infamous
+"chucknorris" string into an rgb() triplet:
+
+.. code-block:: python
+
+ >>> import webcolors
+ >>> webcolors.html5_parse_legacy_color(u'chucknorris')
+ HTML5SimpleColor(red=192, green=0, blue=0)
+
+Full documentation is `available online <https://webcolors.readthedocs.io/>`_.
+
+
+%package -n python3-webcolors
+Summary: A library for working with color names and color values formats defined by HTML and CSS.
+Provides: python-webcolors
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-webcolors
+.. -*-restructuredtext-*-
+
+.. image:: https://github.com/ubernostrum/webcolors/workflows/CI/badge.svg
+ :alt: CI status image
+ :target: https://github.com/ubernostrum/webcolors/actions?query=workflow%3ACI
+
+``webcolors`` is a 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
+
+For example:
+
+.. code-block:: python
+
+ >>> import webcolors
+ >>> webcolors.hex_to_name(u'#daa520')
+ u'goldenrod'
+
+Implementations are also provided for the HTML5 color parsing and
+serialization algorithms. For example, parsing the infamous
+"chucknorris" string into an rgb() triplet:
+
+.. code-block:: python
+
+ >>> import webcolors
+ >>> webcolors.html5_parse_legacy_color(u'chucknorris')
+ HTML5SimpleColor(red=192, green=0, blue=0)
+
+Full documentation is `available online <https://webcolors.readthedocs.io/>`_.
+
+
+%package help
+Summary: Development documents and examples for webcolors
+Provides: python3-webcolors-doc
+%description help
+.. -*-restructuredtext-*-
+
+.. image:: https://github.com/ubernostrum/webcolors/workflows/CI/badge.svg
+ :alt: CI status image
+ :target: https://github.com/ubernostrum/webcolors/actions?query=workflow%3ACI
+
+``webcolors`` is a 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
+
+For example:
+
+.. code-block:: python
+
+ >>> import webcolors
+ >>> webcolors.hex_to_name(u'#daa520')
+ u'goldenrod'
+
+Implementations are also provided for the HTML5 color parsing and
+serialization algorithms. For example, parsing the infamous
+"chucknorris" string into an rgb() triplet:
+
+.. code-block:: python
+
+ >>> import webcolors
+ >>> webcolors.html5_parse_legacy_color(u'chucknorris')
+ HTML5SimpleColor(red=192, green=0, blue=0)
+
+Full documentation is `available online <https://webcolors.readthedocs.io/>`_.
+
+
+%prep
+%autosetup -n webcolors-1.12
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-webcolors -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 1.12-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..84622cd
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+66d88b014c1f3f9b791acc1f7d43fc5f webcolors-1.12.tar.gz