3 %bcond_without tests # do not perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
8 Summary: beautifulsoup4 - Screen-scraping library
13 Group: Libraries/Python
14 Source0: https://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz
15 # Source0-md5: 8fbd9a7cac0704645fa20d1419036815
16 URL: http://www.crummy.com/software/BeautifulSoup/bs4/
17 BuildRequires: rpm-pythonprov
19 BuildRequires: python-setuptools
22 BuildRequires: python3-setuptools
24 Requires: python-modules
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
30 idioms for iterating, searching, and modifying the parse tree.
32 %package -n python3-%{module}
33 Summary: beautifulsoup4 - Screen-scraping library
34 Group: Libraries/Python
35 Requires: python3-modules
37 %description -n python3-%{module}
38 Beautiful Soup sits atop an HTML or XML parser, providing Pythonic
39 idioms for iterating, searching, and modifying the parse tree.
42 %setup -q -n beautifulsoup4-%{version}
46 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
50 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
56 rm -rf _build/html/_sources
60 rm -rf $RPM_BUILD_ROOT
63 %{__python} setup.py \
64 build --build-base build-2 \
65 install --skip-build \
67 --root=$RPM_BUILD_ROOT
71 %{__python3} setup.py \
72 build --build-base build-3 \
73 install --skip-build \
75 --root=$RPM_BUILD_ROOT
79 rm -rf $RPM_BUILD_ROOT
83 %defattr(644,root,root,755)
84 %doc {AUTHORS,NEWS,README,TODO}.txt
85 %{py_sitescriptdir}/bs4
86 %{py_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info
90 %files -n python3-%{module}
91 %defattr(644,root,root,755)
92 %doc {AUTHORS,NEWS,README,TODO}.txt
93 %{py3_sitescriptdir}/bs4
94 %{py3_sitescriptdir}/beautifulsoup4-%{version}-py*.egg-info