3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
6 %define module webcolors
7 Summary: Library for working with sRGB color specifications as used in HTML and CSS
8 Summary(pl.UTF-8): Biblioteka do pracy z definicjami kolorów sRGB używanymi w formatach HTML i CSS
9 Name: python3-%{module}
13 Group: Libraries/Python
14 #Source0Download: https://github.com/ubernostrum/webcolors/releases
15 Source0: https://github.com/ubernostrum/webcolors/archive/%{version}/%{module}-%{version}.tar.gz
16 # Source0-md5: ca4ebd2707fa1b4ef6e024dba3a8e13a
17 URL: https://github.com/ubernostrum/webcolors
18 Requires: python3-modules >= 1:3.5
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python3-sphinx_rtd_theme
23 BuildRequires: sphinx-pdg-3
25 Requires: python3-modules >= 1:3.5
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 A library for working with color names and color value formats defined
31 by the HTML and CSS specifications for use in documents on the Web.
33 Support is included for the following formats (RGB colorspace only;
34 conversion to/from HSL can be handled by the colorsys module in the
35 Python standard library):
36 - Specification-defined color names
37 - Six-digit hexadecimal
38 - Three-digit hexadecimal
39 - Integer rgb() triplet
40 - Percentage rgb() triple
42 %description -l pl.UTF-8
43 Biblioteka do pracy z nazwami kolorów oraz formatami wartości kolorów
44 określonymi w specyfikacjach HTML i CSS, przeznaczonych do użycia w
47 Obsługiwane są następujące formaty (tylko przestrzeń nazw RGB;
48 konwersję do/z HSL można uzyskać korzystając z modułu colorsys
49 biblioteki standardowej Pythona):
50 - nazwy kolorów określone w specyfikacji
51 - sześciocyfrowe wartości szesnastkowe
52 - trzycyfrowe wartości szesnastkowe
53 - trójki całkowite rgb()
54 - trójki procentowe rgb()
57 Summary: Documentation for Python webcolors module
58 Summary(pl.UTF-8): Dokumentacja do modułu Pythona webcolors
62 Documentation for Python webcolors module.
64 %description apidocs -l pl.UTF-8
65 Dokumentacja do modułu Pythona webcolors.
68 %setup -q -n %{module}-%{version}
74 PYTHONPATH=$(pwd)/src \
75 %{__python3} -m unittest discover -s tests
79 %{__make} -C docs html \
80 SPHINXBUILD=sphinx-build-3
84 rm -rf $RPM_BUILD_ROOT
89 rm -rf $RPM_BUILD_ROOT
92 %defattr(644,root,root,755)
93 %doc LICENSE README.rst
94 %{py3_sitescriptdir}/webcolors.py
95 %{py3_sitescriptdir}/__pycache__/webcolors.cpython-*.py[co]
96 %{py3_sitescriptdir}/webcolors-%{version}-*.egg-info
100 %defattr(644,root,root,755)
101 %doc docs/_build/html/{_static,*.html,*.js}