]> git.pld-linux.org Git - packages/python-webcolors.git/blame - python-webcolors.spec
- updated to 1.7
[packages/python-webcolors.git] / python-webcolors.spec
CommitLineData
2b581be5
JB
1#
2# Conditional build:
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
7
2fc397ca 8%define module webcolors
fdfbf7ac 9Summary: Library for working with sRGB color specifications as used in HTML and CSS
2b581be5 10Summary(pl.UTF-8): Biblioteka do pracy z definicjami kolorów sRGB używanymi w formatach HTML i CSS
fdfbf7ac 11Name: python-%{module}
2b581be5
JB
12Version: 1.7
13Release: 1
14License: BSD
15Group: Libraries/Python
16Source0: https://pypi.python.org/packages/1c/11/d9fb5a7c872a941ad8b30a4be191253d5a9028834c4d69eab55bb6bc60be/%{module}-%{version}.tar.gz
17# Source0-md5: 4733fa1077f680bbdd918cdef1e32c11
18URL: https://github.com/ubernostrum/webcolors
19%if %{with python2}
20BuildRequires: python-modules >= 1:2.7
21%endif
22%if %{with python3}
23Requires: python3-modules >= 1:3.3
24%endif
25BuildRequires: rpmbuild(macros) >= 1.714
26%if %{with doc}
27BuildRequires: sphinx-pdg
28%endif
2fc397ca 29BuildRequires: sed >= 4.0
2b581be5 30Requires: python-modules >= 1:2.7
2fc397ca 31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
7cbd3e6a
ER
35A library for working with color names and color value formats defined
36by the HTML and CSS specifications for use in documents on the Web.
2fc397ca 37
7cbd3e6a
ER
38Support is included for the following formats (RGB colorspace only;
39conversion to/from HSL can be handled by the colorsys module in the
40Python standard library):
2fc397ca 41- Specification-defined color names
42- Six-digit hexadecimal
43- Three-digit hexadecimal
44- Integer rgb() triplet
45- Percentage rgb() triple
46
2b581be5
JB
47%description -l pl.UTF-8
48Biblioteka do pracy z nazwami kolorów oraz formatami wartości kolorów
49określonymi w specyfikacjach HTML i CSS, przeznaczonych do użycia w
50dokumentach WWW.
51
52Obsługiwane są następujące formaty (tylko przestrzeń nazw RGB;
53konwersję do/z HSL można uzyskać korzystając z modułu colorsys
54biblioteki 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()
60
61%package -n python3-%{module}
62Summary: Library for working with sRGB color specifications as used in HTML and CSS
63Summary(pl.UTF-8): Biblioteka do pracy z definicjami kolorów sRGB używanymi w formatach HTML i CSS
64Group: Libraries/Python
65Requires: python3-modules >= 1:3.3
66
67%description -n python3-%{module}
68A library for working with color names and color value formats defined
69by the HTML and CSS specifications for use in documents on the Web.
70
71Support is included for the following formats (RGB colorspace only;
72conversion to/from HSL can be handled by the colorsys module in the
73Python standard library):
74- Specification-defined color names
75- Six-digit hexadecimal
76- Three-digit hexadecimal
77- Integer rgb() triplet
78- Percentage rgb() triple
79
80%description -n python3-%{module} -l pl.UTF-8
81Biblioteka do pracy z nazwami kolorów oraz formatami wartości kolorów
82określonymi w specyfikacjach HTML i CSS, przeznaczonych do użycia w
83dokumentach WWW.
84
85Obsługiwane są następujące formaty (tylko przestrzeń nazw RGB;
86konwersję do/z HSL można uzyskać korzystając z modułu colorsys
87biblioteki 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()
93
94%package apidocs
95Summary: Documentation for Python webcolors module
96Summary(pl.UTF-8): Dokumentacja do modułu Pythona webcolors
97Group: Documentation
98
99%description apidocs
100Documentation for Python webcolors module.
101
102%description apidocs -l pl.UTF-8
103Dokumentacja do modułu Pythona webcolors.
104
2fc397ca 105%prep
106%setup -q -n %{module}-%{version}
2fc397ca 107
108%build
2b581be5 109%if %{with python2}
55c563e4 110%py_build
2fc397ca 111
2b581be5
JB
112%{__python} -m unittest tests
113%endif
114
115%if %{with python3}
116%py3_build
117
118%{__python3} -m unittest tests
119%endif
120
121%if %{with doc}
122%{__make} -C docs html
123%endif
124
2fc397ca 125%install
126rm -rf $RPM_BUILD_ROOT
2b581be5
JB
127
128%if %{with python2}
129%py_install
2fc397ca 130
7cbd3e6a 131%py_postclean
2b581be5
JB
132%endif
133
134%if %{with python3}
135%py3_install
136%endif
7cbd3e6a 137
2fc397ca 138%clean
139rm -rf $RPM_BUILD_ROOT
140
2b581be5 141%if %{with python2}
2fc397ca 142%files
143%defattr(644,root,root,755)
2b581be5
JB
144%doc LICENSE README.rst
145%{py_sitescriptdir}/webcolors.py[co]
146%{py_sitescriptdir}/webcolors-%{version}-*.egg-info
147%endif
148
149%if %{with python3}
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
156%endif
157
158%if %{with doc}
159%files apidocs
160%defattr(644,root,root,755)
161%doc docs/_build/html/{_static,*.html,*.js}
2fc397ca 162%endif
This page took 0.088878 seconds and 4 git commands to generate.