]> git.pld-linux.org Git - packages/python3-tinycss2.git/blob - python3-tinycss2.spec
7bdb5d1cd8c54b81a3be13cde184cf075425a928
[packages/python3-tinycss2.git] / python3-tinycss2.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5
6 Summary:        Low-level CSS parser for Python
7 Summary(pl.UTF-8):      Niskopoziomowy parser CSS dla Pythona
8 Name:           python3-tinycss2
9 Version:        1.1.0
10 Release:        4
11 License:        BSD
12 Group:          Libraries/Python
13 #Source0Download: https://pypi.org/simple/tinycss2/
14 Source0:        https://files.pythonhosted.org/packages/source/t/tinycss2/tinycss2-%{version}.tar.gz
15 # Source0-md5:  7caf513c4e87fc2449dcfbf407a8416f
16 Patch0:         disable-flake8-isort-for-pytest.patch
17 Patch1:         disable-missing-data-tests.patch
18 Patch2:         no-cov.patch
19 URL:            https://pypi.org/project/tinycss2/
20 BuildRequires:  python3-modules >= 1:3.6
21 BuildRequires:  python3-setuptools
22 %if %{with tests}
23 BuildRequires:  python3-pytest
24 BuildRequires:  python3-pytest-cov
25 BuildRequires:  python3-webencodings >= 0.4
26 %endif
27 %if %{with doc}
28 BuildRequires:  python3-Sphinx
29 BuildRequires:  python3-sphinx_rtd_theme
30 %endif
31 BuildRequires:  rpm-pythonprov
32 BuildRequires:  rpmbuild(macros) >= 1.714
33 BuildRequires:  sed >= 4.0
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 tinycss2 is a modern, low-level CSS parser for Python. tinycss2 is a
39 rewrite of tinycss with a simpler API, based on the more recent CSS
40 Syntax Level 3 specification.
41
42 %description -l pl.UTF-8
43 tinycss2 to nowoczesny, niskopoziomowy parser CSS dla Ptyhona. Jest to
44 napisany od początku tinycss z prostszym API, oparty na nowszej
45 specyfikacji CSS Syntax Level 3.
46
47 %package apidocs
48 Summary:        API documentation for Python tinycss2 module
49 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona tinycss2
50 Group:          Documentation
51
52 %description apidocs
53 API documentation for Python tinycss2 module.
54
55 %description apidocs -l pl.UTF-8
56 Dokumentacja API modułu Pythona tinycss2.
57
58 %prep
59 %setup -n tinycss2-%{version}
60 %patch0 -p1
61 %patch1 -p1
62 %patch2 -p1
63
64 # for pythonegg dependencies
65 %{__sed} -i -e 's/distutils.core/setuptools/' setup.py
66
67 %build
68 %py3_build
69
70 %if %{with tests}
71 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
72 %{__python3} -m pytest -v
73 %endif
74
75 %if %{with doc}
76 cd docs
77 PYTHONPATH=$(pwd)/.. \
78 %{__python3} -m sphinx -W . build/html
79 %endif
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83
84 %py3_install
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %files
90 %defattr(644,root,root,755)
91 %doc LICENSE README.rst
92 %{py3_sitescriptdir}/tinycss2
93 %{py3_sitescriptdir}/tinycss2-%{version}-py*.egg-info
94
95 %if %{with doc}
96 %files apidocs
97 %defattr(644,root,root,755)
98 %doc docs/build/html/{_static,*.html,*.js}
99 %endif
This page took 0.081313 seconds and 2 git commands to generate.