]> git.pld-linux.org Git - packages/python-soupsieve.git/blob - python-soupsieve.spec
- new
[packages/python-soupsieve.git] / python-soupsieve.spec
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
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
13 Version:        1.9.6
14 Release:        1
15 License:        MIT
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/
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-backports.functools_lru_cache
26 BuildRequires:  python-bs4
27 BuildRequires:  python-html5lib
28 BuildRequires:  python-lxml
29 BuildRequires:  python-pytest
30 %endif
31 %endif
32 %if %{with python3}
33 BuildRequires:  python3-modules >= 1:3.5
34 BuildRequires:  python3-setuptools
35 %if %{with tests}
36 BuildRequires:  python3-bs4
37 BuildRequires:  python3-html5lib
38 BuildRequires:  python3-lxml
39 BuildRequires:  python3-pytest
40 %endif
41 %endif
42 %if %{with doc}
43 BuildRequires:  python-backports.functools_lru_cache
44 BuildRequires:  python-mkdocs-material >= 2.2.5
45 %endif
46 BuildRequires:  rpm-pythonprov
47 BuildRequires:  rpmbuild(macros) >= 1.714
48 Requires:       python-modules >= 1:2.7
49 BuildArch:      noarch
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %description
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).
58
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ą
65 zaimplementowane).
66
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
72
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).
79
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ą
86 zaimplementowane).
87
88 %package apidocs
89 Summary:        API documentation for Python soupsieve module
90 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona soupsieve
91 Group:          Documentation
92
93 %description apidocs
94 API documentation for Python soupsieve module.
95
96 %description apidocs -l pl.UTF-8
97 Dokumentacja 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}
107 PYTEST_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}
116 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
117 %{__python3} -m pytest tests
118 %endif
119 %endif
120
121 %if %{with doc}
122 mkdocs build --clean --verbose --strict
123 %endif
124
125 %install
126 rm -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
139 rm -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.069112 seconds and 3 git commands to generate.