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