]> git.pld-linux.org Git - packages/python-soupsieve.git/blame - python-soupsieve.spec
- new
[packages/python-soupsieve.git] / python-soupsieve.spec
CommitLineData
8a8478d7
JB
1# TODO: doc (requires mkdocs-material)
2#
3# Conditional build:
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
8
9Summary: Modern CSS selector implementation for Beautiful Soup
10Summary(pl.UTF-8): Współczesna implementacja wybierania CSS dla Beautiful Soup
11Name: python-soupsieve
12# keep 1.x here for python2 support
13Version: 1.9.6
14Release: 1
15License: MIT
16Group: Libraries/Python
17#Source0Download: https://pypi.org/simple/soupsieve/
18Source0: https://files.pythonhosted.org/packages/source/s/soupsieve/soupsieve-%{version}.tar.gz
19# Source0-md5: 056fc893f7e6d4df64c136e07c426342
20URL: https://pypi.org/project/soupsieve/
21%if %{with python2}
22BuildRequires: python-modules >= 1:2.7
23BuildRequires: python-setuptools
24%if %{with tests}
25BuildRequires: python-backports.functools_lru_cache
26BuildRequires: python-bs4
27BuildRequires: python-html5lib
28BuildRequires: python-lxml
29BuildRequires: python-pytest
30%endif
31%endif
32%if %{with python3}
33BuildRequires: python3-modules >= 1:3.5
34BuildRequires: python3-setuptools
35%if %{with tests}
36BuildRequires: python3-bs4
37BuildRequires: python3-html5lib
38BuildRequires: python3-lxml
39BuildRequires: python3-pytest
40%endif
41%endif
42%if %{with doc}
43BuildRequires: python-backports.functools_lru_cache
44BuildRequires: python-mkdocs-material >= 2.2.5
45%endif
46BuildRequires: rpm-pythonprov
47BuildRequires: rpmbuild(macros) >= 1.714
48Requires: python-modules >= 1:2.7
49BuildArch: noarch
50BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52%description
53Soup Sieve is a CSS selector library designed to be used with
54Beautiful Soup 4 (bs4). It aims to provide selecting, matching, and
55filtering using modern CSS selectors. Soup Sieve currently provides
56selectors from the CSS level 1 specifications up through the latest
57CSS level 4 drafts and beyond (though some are not yet implemented).
58
59%description -l pl.UTF-8
60Soup Sieve to biblioteka wybierania CSS zaprojektowana z myślą o
61używaniu w Beautiful Soup 4 (bs4). Celem jest zapewnienie wyboru,
62dopasowywania i filtrowania przy użyciu współczesnego wybierania CSS.
63Soup Sieve obecnie zawiera wybieranie ze specyfikacji od CSS poziomu 1
64do najnowszych szkiców CSS poziomu 4 i nowszych (ale nie wszystkie są
65zaimplementowane).
66
67%package -n python3-soupsieve
68Summary: Modern CSS selector implementation for Beautiful Soup
69Summary(pl.UTF-8): Współczesna implementacja wybierania CSS dla Beautiful Soup
70Group: Libraries/Python
71Requires: python3-modules >= 1:3.5
72
73%description -n python3-soupsieve
74Soup Sieve is a CSS selector library designed to be used with
75Beautiful Soup 4 (bs4). It aims to provide selecting, matching, and
76filtering using modern CSS selectors. Soup Sieve currently provides
77selectors from the CSS level 1 specifications up through the latest
78CSS level 4 drafts and beyond (though some are not yet implemented).
79
80%description -n python3-soupsieve -l pl.UTF-8
81Soup Sieve to biblioteka wybierania CSS zaprojektowana z myślą o
82używaniu w Beautiful Soup 4 (bs4). Celem jest zapewnienie wyboru,
83dopasowywania i filtrowania przy użyciu współczesnego wybierania CSS.
84Soup Sieve obecnie zawiera wybieranie ze specyfikacji od CSS poziomu 1
85do najnowszych szkiców CSS poziomu 4 i nowszych (ale nie wszystkie są
86zaimplementowane).
87
88%package apidocs
89Summary: API documentation for Python soupsieve module
90Summary(pl.UTF-8): Dokumentacja API modułu Pythona soupsieve
91Group: Documentation
92
93%description apidocs
94API documentation for Python soupsieve module.
95
96%description apidocs -l pl.UTF-8
97Dokumentacja API modułu Pythona soupsieve.
98
99%prep
100%setup -q -n soupsieve-%{version}
101
102%build
103%if %{with python2}
104%py_build
105
106%if %{with tests}
107PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
108%{__python} -m pytest tests
109%endif
110%endif
111
112%if %{with python3}
113%py3_build
114
115%if %{with tests}
116PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
117%{__python3} -m pytest tests
118%endif
119%endif
120
121%if %{with doc}
122mkdocs build --clean --verbose --strict
123%endif
124
125%install
126rm -rf $RPM_BUILD_ROOT
127
128%if %{with python2}
129%py_install
130
131%py_postclean
132%endif
133
134%if %{with python3}
135%py3_install
136%endif
137
138%clean
139rm -rf $RPM_BUILD_ROOT
140
141%if %{with python2}
142%files
143%defattr(644,root,root,755)
144%doc LICENSE.md README.md
145%{py_sitescriptdir}/soupsieve
146%{py_sitescriptdir}/soupsieve-%{version}-py*.egg-info
147%endif
148
149%if %{with python3}
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
155%endif
156
157%if %{with doc}
158%files apidocs
159%defattr(644,root,root,755)
160%doc docs/_build/html/*
161%endif
This page took 0.11351 seconds and 4 git commands to generate.