3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # unit tests
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
9 Summary: beautifulsoup4 - Screen-scraping library
10 Summary(pl.UTF-8): beautifulsoup4 - biblioteka przechwytująca wyjście
11 Name: python-%{module}
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/beautifulsoup4/
17 Source0: https://files.pythonhosted.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz
18 # Source0-md5: a08ea866a5c508d9b4c28c4d21e05df8
19 Patch0: test_suite.patch
20 Patch1: %{name}-lxml.patch
21 Patch2: %{name}-smart_quotes.patch
22 URL: https://www.crummy.com/software/BeautifulSoup/
23 BuildRequires: rpmbuild(macros) >= 1.714
24 BuildRequires: rpm-pythonprov
26 BuildRequires: python-modules >= 1:2.7
27 BuildRequires: python-setuptools
30 BuildRequires: python3-modules >= 1:3.2
31 BuildRequires: python3-setuptools
34 BuildRequires: sphinx-pdg
36 Requires: python-modules >= 1:2.7
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
42 idioms for iterating, searching, and modifying the parse tree.
44 %description -l pl.UTF-8
45 Beautiful Soup rezyduje powyżej parsera HTML lub XML, zapewniając
46 pythonowe idiomy do iterowania, wyszukiwania i modyfikowania drzewa
49 %package -n python3-%{module}
50 Summary: beautifulsoup4 - Screen-scraping library
51 Summary(pl.UTF-8): beautifulsoup4 - biblioteka przechwytująca wyjście
52 Group: Libraries/Python
53 Requires: python3-modules >= 1:3.2
55 %description -n python3-%{module}
56 Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
57 idioms for iterating, searching, and modifying the parse tree.
59 %description -n python3-%{module} -l pl.UTF-8
60 Beautiful Soup rezyduje powyżej parsera HTML lub XML, zapewniając
61 pythonowe idiomy do iterowania, wyszukiwania i modyfikowania drzewa
65 Summary: API documentation for Python beautifulsoup4 module
66 Summary(pl.UTF-8): Dokumentacja API modułu Pythona beautifulsoup4
70 API documentation for Python beautifulsoup4 module.
72 %description apidocs -l pl.UTF-8
73 Dokumentacja API modułu Pythona beautifulsoup4.
76 %setup -q -n beautifulsoup4-%{version}
83 %py_build %{?with_tests:test}
87 %py3_build %{?with_tests:test}
95 rm -rf $RPM_BUILD_ROOT
106 rm -rf $RPM_BUILD_ROOT
110 %defattr(644,root,root,755)
111 %doc AUTHORS.txt COPYING.txt NEWS.txt README.md TODO.txt
112 %{py_sitescriptdir}/bs4
113 %{py_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
117 %files -n python3-%{module}
118 %defattr(644,root,root,755)
119 %doc AUTHORS.txt COPYING.txt NEWS.txt README.md TODO.txt
120 %{py3_sitescriptdir}/bs4
121 %{py3_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
126 %defattr(644,root,root,755)
127 %doc doc/build/html/{_images,_static,*.html,*.js}