1 # TODO: doc (requires mkdocs-material)
4 %bcond_with doc # API documentation
5 %bcond_with tests # unit tests (fail... too old bs4?)
6 %bcond_without python2 # CPython 2.x module
7 %bcond_without python3 # CPython 3.x module
9 Summary: Modern CSS selector implementation for Beautiful Soup
10 Summary(pl.UTF-8): Współczesna implementacja wybierania CSS dla Beautiful Soup
11 Name: python-soupsieve
12 # keep 1.x here for python2 support
16 Group: Libraries/Python
17 #Source0Download: https://pypi.org/simple/soupsieve/
18 Source0: https://files.pythonhosted.org/packages/source/s/soupsieve/soupsieve-%{version}.tar.gz
19 # Source0-md5: 056fc893f7e6d4df64c136e07c426342
20 URL: https://pypi.org/project/soupsieve/
22 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python-setuptools
25 BuildRequires: python-backports.functools_lru_cache
26 BuildRequires: python-bs4
27 BuildRequires: python-html5lib
28 BuildRequires: python-lxml
29 BuildRequires: python-pytest
33 BuildRequires: python3-modules >= 1:3.5
34 BuildRequires: python3-setuptools
36 BuildRequires: python3-bs4
37 BuildRequires: python3-html5lib
38 BuildRequires: python3-lxml
39 BuildRequires: python3-pytest
43 BuildRequires: python-backports.functools_lru_cache
44 BuildRequires: python-mkdocs-material >= 2.2.5
46 BuildRequires: rpm-pythonprov
47 BuildRequires: rpmbuild(macros) >= 1.714
48 Requires: python-modules >= 1:2.7
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53 Soup Sieve is a CSS selector library designed to be used with
54 Beautiful Soup 4 (bs4). It aims to provide selecting, matching, and
55 filtering using modern CSS selectors. Soup Sieve currently provides
56 selectors from the CSS level 1 specifications up through the latest
57 CSS level 4 drafts and beyond (though some are not yet implemented).
59 %description -l pl.UTF-8
60 Soup Sieve to biblioteka wybierania CSS zaprojektowana z myślą o
61 używaniu w Beautiful Soup 4 (bs4). Celem jest zapewnienie wyboru,
62 dopasowywania i filtrowania przy użyciu współczesnego wybierania CSS.
63 Soup Sieve obecnie zawiera wybieranie ze specyfikacji od CSS poziomu 1
64 do najnowszych szkiców CSS poziomu 4 i nowszych (ale nie wszystkie są
67 %package -n python3-soupsieve
68 Summary: Modern CSS selector implementation for Beautiful Soup
69 Summary(pl.UTF-8): Współczesna implementacja wybierania CSS dla Beautiful Soup
70 Group: Libraries/Python
71 Requires: python3-modules >= 1:3.5
73 %description -n python3-soupsieve
74 Soup Sieve is a CSS selector library designed to be used with
75 Beautiful Soup 4 (bs4). It aims to provide selecting, matching, and
76 filtering using modern CSS selectors. Soup Sieve currently provides
77 selectors from the CSS level 1 specifications up through the latest
78 CSS level 4 drafts and beyond (though some are not yet implemented).
80 %description -n python3-soupsieve -l pl.UTF-8
81 Soup Sieve to biblioteka wybierania CSS zaprojektowana z myślą o
82 używaniu w Beautiful Soup 4 (bs4). Celem jest zapewnienie wyboru,
83 dopasowywania i filtrowania przy użyciu współczesnego wybierania CSS.
84 Soup Sieve obecnie zawiera wybieranie ze specyfikacji od CSS poziomu 1
85 do najnowszych szkiców CSS poziomu 4 i nowszych (ale nie wszystkie są
89 Summary: API documentation for Python soupsieve module
90 Summary(pl.UTF-8): Dokumentacja API modułu Pythona soupsieve
94 API documentation for Python soupsieve module.
96 %description apidocs -l pl.UTF-8
97 Dokumentacja API modułu Pythona soupsieve.
100 %setup -q -n soupsieve-%{version}
107 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
108 %{__python} -m pytest tests
116 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
117 %{__python3} -m pytest tests
122 mkdocs build --clean --verbose --strict
126 rm -rf $RPM_BUILD_ROOT
139 rm -rf $RPM_BUILD_ROOT
143 %defattr(644,root,root,755)
144 %doc LICENSE.md README.md
145 %{py_sitescriptdir}/soupsieve
146 %{py_sitescriptdir}/soupsieve-%{version}-py*.egg-info
150 %files -n python3-soupsieve
151 %defattr(644,root,root,755)
152 %doc LICENSE.md README.md
153 %{py3_sitescriptdir}/soupsieve
154 %{py3_sitescriptdir}/soupsieve-%{version}-py*.egg-info
159 %defattr(644,root,root,755)
160 %doc docs/_build/html/*