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