]>
Commit | Line | Data |
---|---|---|
0745c189 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | ||
5 | Summary: Low-level CSS parser for Python | |
6 | Name: python3-tinycss2 | |
7 | Version: 1.1.0 | |
8 | Release: 2 | |
9 | License: BSD | |
10 | Source0: https://files.pythonhosted.org/packages/source/t/tinycss2/tinycss2-%{version}.tar.gz | |
11 | # Source0-md5: 7caf513c4e87fc2449dcfbf407a8416f | |
12 | Patch0: disable-flake8-isort-for-pytest.patch | |
13 | Patch1: disable-missing-data-tests.patch | |
14 | URL: https://pypi.python.org/pypi/tinycss2/ | |
15 | # required to run the tests | |
16 | %if %{with tests} | |
17 | BuildRequires: python3-pytest | |
18 | BuildRequires: python3-pytest-cov | |
19 | BuildRequires: python3-pytest-runner | |
20 | BuildRequires: python3-setuptools | |
21 | BuildRequires: python3-webencodings >= 0.4 | |
22 | %endif | |
23 | BuildArch: noarch | |
24 | ||
25 | %description | |
26 | tinycss2 is a modern, low-level CSS parser for Python. tinycss2 is a | |
27 | rewrite of tinycss with a simpler API, based on the more recent CSS | |
28 | Syntax Level 3 specification. | |
29 | ||
30 | %prep | |
31 | %setup -n tinycss2-%{version} | |
32 | %patch0 -p1 | |
33 | %patch1 -p1 | |
34 | ||
35 | %build | |
36 | %py3_build | |
37 | ||
38 | %install | |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | %py3_install | |
41 | ||
42 | %if %{with tests} | |
43 | %{__python3} -m pytest -v | |
44 | %endif | |
45 | ||
46 | %clean | |
47 | rm -rf $RPM_BUILD_ROOT | |
48 | ||
49 | %files | |
50 | %defattr(644,root,root,755) | |
51 | %doc README.rst | |
52 | %{py3_sitescriptdir}/tinycss2 | |
53 | %{py3_sitescriptdir}/tinycss2-%{version}-py*.egg-info |