]> git.pld-linux.org Git - packages/python3-webcolors.git/blob - python3-webcolors.spec
rebuild with tests and docs
[packages/python3-webcolors.git] / python3-webcolors.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5
6 %define         module  webcolors
7 Summary:        Library for working with sRGB color specifications as used in HTML and CSS
8 Summary(pl.UTF-8):      Biblioteka do pracy z definicjami kolorów sRGB używanymi w formatach HTML i CSS
9 Name:           python3-%{module}
10 Version:        1.11.1
11 Release:        4
12 License:        BSD
13 Group:          Libraries/Python
14 #Source0Download: https://github.com/ubernostrum/webcolors/releases
15 Source0:        https://github.com/ubernostrum/webcolors/archive/%{version}/%{module}-%{version}.tar.gz
16 # Source0-md5:  ca4ebd2707fa1b4ef6e024dba3a8e13a
17 URL:            https://github.com/ubernostrum/webcolors
18 Requires:       python3-modules >= 1:3.5
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.714
21 %if %{with doc}
22 BuildRequires:  python3-sphinx_rtd_theme
23 BuildRequires:  sphinx-pdg-3
24 %endif
25 Requires:       python3-modules >= 1:3.5
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 A library for working with color names and color value formats defined
31 by the HTML and CSS specifications for use in documents on the Web.
32
33 Support is included for the following formats (RGB colorspace only;
34 conversion to/from HSL can be handled by the colorsys module in the
35 Python standard library):
36 - Specification-defined color names
37 - Six-digit hexadecimal
38 - Three-digit hexadecimal
39 - Integer rgb() triplet
40 - Percentage rgb() triple
41
42 %description -l pl.UTF-8
43 Biblioteka do pracy z nazwami kolorów oraz formatami wartości kolorów
44 określonymi w specyfikacjach HTML i CSS, przeznaczonych do użycia w
45 dokumentach WWW.
46
47 Obsługiwane są następujące formaty (tylko przestrzeń nazw RGB;
48 konwersję do/z HSL można uzyskać korzystając z modułu colorsys
49 biblioteki standardowej Pythona):
50 - nazwy kolorów określone w specyfikacji
51 - sześciocyfrowe wartości szesnastkowe
52 - trzycyfrowe wartości szesnastkowe
53 - trójki całkowite rgb()
54 - trójki procentowe rgb()
55
56 %package apidocs
57 Summary:        Documentation for Python webcolors module
58 Summary(pl.UTF-8):      Dokumentacja do modułu Pythona webcolors
59 Group:          Documentation
60
61 %description apidocs
62 Documentation for Python webcolors module.
63
64 %description apidocs -l pl.UTF-8
65 Dokumentacja do modułu Pythona webcolors.
66
67 %prep
68 %setup -q -n %{module}-%{version}
69
70 %build
71 %py3_build
72
73 %if %{with tests}
74 PYTHONPATH=$(pwd)/src \
75 %{__python3} -m unittest discover -s tests
76 %endif
77
78 %if %{with doc}
79 %{__make} -C docs html \
80         SPHINXBUILD=sphinx-build-3
81 %endif
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 %py3_install
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %files
92 %defattr(644,root,root,755)
93 %doc LICENSE README.rst
94 %{py3_sitescriptdir}/webcolors.py
95 %{py3_sitescriptdir}/__pycache__/webcolors.cpython-*.py[co]
96 %{py3_sitescriptdir}/webcolors-%{version}-*.egg-info
97
98 %if %{with doc}
99 %files apidocs
100 %defattr(644,root,root,755)
101 %doc docs/_build/html/{_static,*.html,*.js}
102 %endif
This page took 0.075178 seconds and 3 git commands to generate.