]> git.pld-linux.org Git - packages/python-webcolors.git/blob - python-webcolors.spec
- release 2 (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.7
13 Release:        2
14 License:        BSD
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
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:  sphinx-pdg
29 %endif
30 Requires:       python-modules >= 1:2.7
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
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.
37
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
46
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
50 dokumentach WWW.
51
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()
60
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
66
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.
70
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
79
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
83 dokumentach WWW.
84
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()
93
94 %package apidocs
95 Summary:        Documentation for Python webcolors module
96 Summary(pl.UTF-8):      Dokumentacja do modułu Pythona webcolors
97 Group:          Documentation
98
99 %description apidocs
100 Documentation for Python webcolors module.
101
102 %description apidocs -l pl.UTF-8
103 Dokumentacja do modułu Pythona webcolors.
104
105 %prep
106 %setup -q -n %{module}-%{version}
107
108 %build
109 %if %{with python2}
110 %py_build
111
112 %{__python} -m unittest discover -s tests
113 %endif
114
115 %if %{with python3}
116 %py3_build
117
118 %{__python3} -m unittest discover -s tests
119 %endif
120
121 %if %{with doc}
122 %{__make} -C docs html
123 %endif
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127
128 %if %{with python2}
129 %py_install
130
131 %py_postclean
132 %endif
133
134 %if %{with python3}
135 %py3_install
136 %endif
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141 %if %{with python2}
142 %files
143 %defattr(644,root,root,755)
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}
162 %endif
This page took 0.042298 seconds and 3 git commands to generate.