3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_without doc # Sphinx documentation
6 %bcond_without tests # unit tests
8 %define module webcolors
9 Summary: Library for working with sRGB color specifications as used in HTML and CSS
10 Summary(pl.UTF-8): Biblioteka do pracy z definicjami kolorów sRGB używanymi w formatach HTML i CSS
11 Name: python-%{module}
15 Group: Libraries/Python
16 Source0: https://pypi.python.org/packages/1c/11/d9fb5a7c872a941ad8b30a4be191253d5a9028834c4d69eab55bb6bc60be/%{module}-%{version}.tar.gz
17 # Source0-md5: 4733fa1077f680bbdd918cdef1e32c11
18 URL: https://github.com/ubernostrum/webcolors
20 BuildRequires: python-modules >= 1:2.7
23 Requires: python3-modules >= 1:3.3
25 BuildRequires: rpm-pythonprov
26 BuildRequires: rpmbuild(macros) >= 1.714
28 BuildRequires: sphinx-pdg
30 Requires: python-modules >= 1:2.7
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 A library for working with color names and color value formats defined
36 by the HTML and CSS specifications for use in documents on the Web.
38 Support is included for the following formats (RGB colorspace only;
39 conversion to/from HSL can be handled by the colorsys module in the
40 Python standard library):
41 - Specification-defined color names
42 - Six-digit hexadecimal
43 - Three-digit hexadecimal
44 - Integer rgb() triplet
45 - Percentage rgb() triple
47 %description -l pl.UTF-8
48 Biblioteka do pracy z nazwami kolorów oraz formatami wartości kolorów
49 określonymi w specyfikacjach HTML i CSS, przeznaczonych do użycia w
52 Obsługiwane są następujące formaty (tylko przestrzeń nazw RGB;
53 konwersję do/z HSL można uzyskać korzystając z modułu colorsys
54 biblioteki standardowej Pythona):
55 - nazwy kolorów określone w specyfikacji
56 - sześciocyfrowe wartości szesnastkowe
57 - trzycyfrowe wartości szesnastkowe
58 - trójki całkowite rgb()
59 - trójki procentowe rgb()
61 %package -n python3-%{module}
62 Summary: Library for working with sRGB color specifications as used in HTML and CSS
63 Summary(pl.UTF-8): Biblioteka do pracy z definicjami kolorów sRGB używanymi w formatach HTML i CSS
64 Group: Libraries/Python
65 Requires: python3-modules >= 1:3.3
67 %description -n python3-%{module}
68 A library for working with color names and color value formats defined
69 by the HTML and CSS specifications for use in documents on the Web.
71 Support is included for the following formats (RGB colorspace only;
72 conversion to/from HSL can be handled by the colorsys module in the
73 Python standard library):
74 - Specification-defined color names
75 - Six-digit hexadecimal
76 - Three-digit hexadecimal
77 - Integer rgb() triplet
78 - Percentage rgb() triple
80 %description -n python3-%{module} -l pl.UTF-8
81 Biblioteka do pracy z nazwami kolorów oraz formatami wartości kolorów
82 określonymi w specyfikacjach HTML i CSS, przeznaczonych do użycia w
85 Obsługiwane są następujące formaty (tylko przestrzeń nazw RGB;
86 konwersję do/z HSL można uzyskać korzystając z modułu colorsys
87 biblioteki standardowej Pythona):
88 - nazwy kolorów określone w specyfikacji
89 - sześciocyfrowe wartości szesnastkowe
90 - trzycyfrowe wartości szesnastkowe
91 - trójki całkowite rgb()
92 - trójki procentowe rgb()
95 Summary: Documentation for Python webcolors module
96 Summary(pl.UTF-8): Dokumentacja do modułu Pythona webcolors
100 Documentation for Python webcolors module.
102 %description apidocs -l pl.UTF-8
103 Dokumentacja do modułu Pythona webcolors.
106 %setup -q -n %{module}-%{version}
112 %{__python} -m unittest discover -s tests
118 %{__python3} -m unittest discover -s tests
122 %{__make} -C docs html
126 rm -rf $RPM_BUILD_ROOT
139 rm -rf $RPM_BUILD_ROOT
143 %defattr(644,root,root,755)
144 %doc LICENSE README.rst
145 %{py_sitescriptdir}/webcolors.py[co]
146 %{py_sitescriptdir}/webcolors-%{version}-*.egg-info
150 %files -n python3-%{module}
151 %defattr(644,root,root,755)
152 %doc LICENSE README.rst
153 %{py3_sitescriptdir}/webcolors.py
154 %{py3_sitescriptdir}/__pycache__/webcolors.cpython-*.py[co]
155 %{py3_sitescriptdir}/webcolors-%{version}-*.egg-info
160 %defattr(644,root,root,755)
161 %doc docs/_build/html/{_static,*.html,*.js}