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