Group: Libraries/Python
Source0: https://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4-%{version}.tar.gz
# Source0-md5: 8fbd9a7cac0704645fa20d1419036815
+Patch0: test_suite.patch
URL: http://www.crummy.com/software/BeautifulSoup/bs4/
BuildRequires: rpm-pythonprov
%if %{with python2}
%prep
%setup -q -n beautifulsoup4-%{version}
+%patch0 -p1
%build
%if %{with python2}
-%{__python} setup.py build --build-base build-2 %{?with_tests:test}
+%py_build %{?with_tests:test}
%endif
%if %{with python3}
-%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
+%py3_build %{?with_tests:test}
%endif
%if %{with doc}
rm -rf $RPM_BUILD_ROOT
%if %{with python2}
-%{__python} setup.py \
- build --build-base build-2 \
- install --skip-build \
- --optimize=2 \
- --root=$RPM_BUILD_ROOT
+%py_install
%endif
%if %{with python3}
-%{__python3} setup.py \
- build --build-base build-3 \
- install --skip-build \
- --optimize=2 \
- --root=$RPM_BUILD_ROOT
+%py3_install
%endif
%clean
--- /dev/null
+diff -dur beautifulsoup4-4.4.1.orig/setup.py beautifulsoup4-4.4.1/setup.py
+--- beautifulsoup4-4.4.1.orig/setup.py 2015-09-29 02:11:15.000000000 +0200
++++ beautifulsoup4-4.4.1/setup.py 2015-11-26 10:42:43.000000000 +0100
+@@ -30,4 +30,5 @@
+ "Topic :: Text Processing :: Markup :: SGML",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ ],
++ test_suite = "bs4.tests",
+ )