]> git.pld-linux.org Git - packages/python-webcolors.git/blame - python-webcolors.spec
- release 3 (by relup.sh)
[packages/python-webcolors.git] / python-webcolors.spec
CommitLineData
fe5065d6 1# NOTE: for versions >= 1.11 (for python 3.5+) see python3-webcolors.spec
2b581be5
JB
2#
3# Conditional build:
4%bcond_without python2 # CPython 2.x module
fe5065d6 5%bcond_with python3 # CPython 3.x module (built from python3-webcolors.spec)
2b581be5
JB
6%bcond_without doc # Sphinx documentation
7%bcond_without tests # unit tests
8
2fc397ca 9%define module webcolors
fdfbf7ac 10Summary: Library for working with sRGB color specifications as used in HTML and CSS
2b581be5 11Summary(pl.UTF-8): Biblioteka do pracy z definicjami kolorów sRGB używanymi w formatach HTML i CSS
fdfbf7ac 12Name: python-%{module}
fe5065d6 13# keep 1.10.x here for python2 support
ece3c2f0 14Version: 1.10
819e9df1 15Release: 3
2b581be5
JB
16License: BSD
17Group: Libraries/Python
ece3c2f0
JB
18#Source0Download: https://github.com/ubernostrum/webcolors/releases
19Source0: https://github.com/ubernostrum/webcolors/archive/%{version}/%{module}-%{version}.tar.gz
20# Source0-md5: 195e37e745a77609aca47ea22b01d8b1
2b581be5
JB
21URL: https://github.com/ubernostrum/webcolors
22%if %{with python2}
23BuildRequires: python-modules >= 1:2.7
ece3c2f0
JB
24%if %{with tests}
25BuildRequires: python-six
26%endif
2b581be5
JB
27%endif
28%if %{with python3}
ece3c2f0
JB
29Requires: python3-modules >= 1:3.5
30%if %{with tests}
31BuildRequires: python3-six
32%endif
2b581be5 33%endif
548575ad 34BuildRequires: rpm-pythonprov
2b581be5
JB
35BuildRequires: rpmbuild(macros) >= 1.714
36%if %{with doc}
8b3dbc2e 37BuildRequires: python3-sphinx_rtd_theme
2b581be5
JB
38BuildRequires: sphinx-pdg
39%endif
2b581be5 40Requires: python-modules >= 1:2.7
2fc397ca 41BuildArch: noarch
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44%description
7cbd3e6a
ER
45A library for working with color names and color value formats defined
46by the HTML and CSS specifications for use in documents on the Web.
2fc397ca 47
7cbd3e6a
ER
48Support is included for the following formats (RGB colorspace only;
49conversion to/from HSL can be handled by the colorsys module in the
50Python standard library):
2fc397ca 51- Specification-defined color names
52- Six-digit hexadecimal
53- Three-digit hexadecimal
54- Integer rgb() triplet
55- Percentage rgb() triple
56
2b581be5
JB
57%description -l pl.UTF-8
58Biblioteka do pracy z nazwami kolorów oraz formatami wartości kolorów
59określonymi w specyfikacjach HTML i CSS, przeznaczonych do użycia w
60dokumentach WWW.
61
62Obsługiwane są następujące formaty (tylko przestrzeń nazw RGB;
63konwersję do/z HSL można uzyskać korzystając z modułu colorsys
64biblioteki standardowej Pythona):
65- nazwy kolorów określone w specyfikacji
66- sześciocyfrowe wartości szesnastkowe
67- trzycyfrowe wartości szesnastkowe
68- trójki całkowite rgb()
69- trójki procentowe rgb()
70
71%package -n python3-%{module}
72Summary: Library for working with sRGB color specifications as used in HTML and CSS
73Summary(pl.UTF-8): Biblioteka do pracy z definicjami kolorów sRGB używanymi w formatach HTML i CSS
74Group: Libraries/Python
ece3c2f0 75Requires: python3-modules >= 1:3.5
2b581be5
JB
76
77%description -n python3-%{module}
78A library for working with color names and color value formats defined
79by the HTML and CSS specifications for use in documents on the Web.
80
81Support is included for the following formats (RGB colorspace only;
82conversion to/from HSL can be handled by the colorsys module in the
83Python standard library):
84- Specification-defined color names
85- Six-digit hexadecimal
86- Three-digit hexadecimal
87- Integer rgb() triplet
88- Percentage rgb() triple
89
90%description -n python3-%{module} -l pl.UTF-8
91Biblioteka do pracy z nazwami kolorów oraz formatami wartości kolorów
92określonymi w specyfikacjach HTML i CSS, przeznaczonych do użycia w
93dokumentach WWW.
94
95Obsługiwane są następujące formaty (tylko przestrzeń nazw RGB;
96konwersję do/z HSL można uzyskać korzystając z modułu colorsys
97biblioteki standardowej Pythona):
98- nazwy kolorów określone w specyfikacji
99- sześciocyfrowe wartości szesnastkowe
100- trzycyfrowe wartości szesnastkowe
101- trójki całkowite rgb()
102- trójki procentowe rgb()
103
104%package apidocs
105Summary: Documentation for Python webcolors module
106Summary(pl.UTF-8): Dokumentacja do modułu Pythona webcolors
107Group: Documentation
108
109%description apidocs
110Documentation for Python webcolors module.
111
112%description apidocs -l pl.UTF-8
113Dokumentacja do modułu Pythona webcolors.
114
2fc397ca 115%prep
116%setup -q -n %{module}-%{version}
2fc397ca 117
118%build
2b581be5 119%if %{with python2}
55c563e4 120%py_build
2fc397ca 121
ece3c2f0
JB
122%if %{with tests}
123PYTHONPATH=$(pwd)/build-2/lib \
6aea0558 124%{__python} -m unittest discover -s tests
2b581be5 125%endif
ece3c2f0 126%endif
2b581be5
JB
127
128%if %{with python3}
129%py3_build
130
ece3c2f0
JB
131%if %{with tests}
132PYTHONPATH=$(pwd)/build-3/lib \
6aea0558 133%{__python3} -m unittest discover -s tests
2b581be5 134%endif
ece3c2f0 135%endif
2b581be5
JB
136
137%if %{with doc}
ece3c2f0
JB
138%{__make} -C docs html \
139 SPHINXBUILD=sphinx-build-3
2b581be5
JB
140%endif
141
2fc397ca 142%install
143rm -rf $RPM_BUILD_ROOT
2b581be5
JB
144
145%if %{with python2}
146%py_install
2fc397ca 147
7cbd3e6a 148%py_postclean
2b581be5
JB
149%endif
150
151%if %{with python3}
152%py3_install
153%endif
7cbd3e6a 154
2fc397ca 155%clean
156rm -rf $RPM_BUILD_ROOT
157
2b581be5 158%if %{with python2}
2fc397ca 159%files
160%defattr(644,root,root,755)
2b581be5
JB
161%doc LICENSE README.rst
162%{py_sitescriptdir}/webcolors.py[co]
163%{py_sitescriptdir}/webcolors-%{version}-*.egg-info
164%endif
165
166%if %{with python3}
167%files -n python3-%{module}
168%defattr(644,root,root,755)
169%doc LICENSE README.rst
170%{py3_sitescriptdir}/webcolors.py
171%{py3_sitescriptdir}/__pycache__/webcolors.cpython-*.py[co]
172%{py3_sitescriptdir}/webcolors-%{version}-*.egg-info
173%endif
174
175%if %{with doc}
176%files apidocs
177%defattr(644,root,root,755)
178%doc docs/_build/html/{_static,*.html,*.js}
2fc397ca 179%endif
This page took 0.150902 seconds and 5 git commands to generate.