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