]> git.pld-linux.org Git - packages/python3-cssselect2.git/blob - python3-cssselect2.spec
Release 4 (by relup.sh)
[packages/python3-cssselect2.git] / python3-cssselect2.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5
6 Summary:        CSS selectors for Python ElementTree
7 Summary(pl.UTF-8):      Selektory CSS dla pythonowego ElementTree
8 Name:           python3-cssselect2
9 Version:        0.4.1
10 Release:        4
11 License:        BSD
12 Group:          Libraries/Python
13 #Source0Download: https://pypi.org/simple/cssselect2/
14 Source0:        https://files.pythonhosted.org/packages/source/c/cssselect2/cssselect2-%{version}.tar.gz
15 # Source0-md5:  6dfd5963c8a5d85f2634d1650b1ddfe1
16 Patch0:         disable-flake8-isort-pytest.patch
17 Patch1:         no-cov.patch
18 URL:            https://cssselect2.readthedocs.io/
19 BuildRequires:  python3-modules >= 1:3.6
20 BuildRequires:  python3-setuptools >= 1:39.2.0
21 %if %{with tests}
22 BuildRequires:  python3-pytest
23 BuildRequires:  python3-pytest-cov
24 BuildRequires:  python3-tinycss2
25 BuildRequires:  python3-webencodings
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 cssselect2 is a straightforward implementation of CSS3 Selectors for
39 markup documents (HTML, XML, etc.) that can be read by
40 ElementTree-like parsers, including cElementTree, lxml, html5lib,
41 etc.
42
43 %description -l pl.UTF-8
44 cssselect2 to bezpośrednia implementacja selektorów CSS3 dla
45 dokumentów ze znacznikami (HTML, XML itp.), które można czytać
46 parserami w stylu ElementTree, w tym cElementTree, lxml, html5lib
47 itp.
48
49 %package apidocs
50 Summary:        API documentation for Python cssselect2 module
51 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona cssselect2
52 Group:          Documentation
53
54 %description apidocs
55 API documentation for Python cssselect2 module.
56
57 %description apidocs -l pl.UTF-8
58 Dokumentacja API modułu Pythona cssselect2.
59
60 %prep
61 %setup -n cssselect2-%{version}
62 %patch0 -p1
63 %patch1 -p1
64
65 # for pythonegg dependencies
66 %{__sed} -i -e 's/distutils.core/setuptools/' setup.py
67
68 %build
69 %py3_build
70
71 %if %{with tests}
72 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
73 %{__python3} -m pytest -v
74 %endif
75
76 %if %{with doc}
77 cd docs
78 PYTHONPATH=$(pwd)/.. \
79 %{__python3} -m sphinx -W . build/html
80 %endif
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84
85 %py3_install
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %files
91 %defattr(644,root,root,755)
92 %doc LICENSE README.rst
93 %{py3_sitescriptdir}/cssselect2
94 %{py3_sitescriptdir}/cssselect2-%{version}-py*.egg-info
95
96 %if %{with doc}
97 %files apidocs
98 %defattr(644,root,root,755)
99 %doc docs/build/html/*
100 %endif
This page took 0.110651 seconds and 3 git commands to generate.