[packages/python-bs4] Use py_build/py_install, fix tests

jajcus jajcus at pld-linux.org
Thu Nov 26 10:46:39 CET 2015


commit f3d1c76a856bb58efc04f2c869115e0fa22e979b
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Thu Nov 26 10:46:10 2015 +0100

    Use py_build/py_install, fix tests

 python-bs4.spec  | 18 ++++++------------
 test_suite.patch |  9 +++++++++
 2 files changed, 15 insertions(+), 12 deletions(-)
---
diff --git a/python-bs4.spec b/python-bs4.spec
index d38f694..c33b868 100644
--- a/python-bs4.spec
+++ b/python-bs4.spec
@@ -13,6 +13,7 @@ License:	MIT
 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}
@@ -40,14 +41,15 @@ idioms for iterating, searching, and modifying the parse tree.
 
 %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}
@@ -60,19 +62,11 @@ rm -rf _build/html/_sources
 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
diff --git a/test_suite.patch b/test_suite.patch
new file mode 100644
index 0000000..a3a357f
--- /dev/null
+++ b/test_suite.patch
@@ -0,0 +1,9 @@
+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",
+ )
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-bs4.git/commitdiff/f3d1c76a856bb58efc04f2c869115e0fa22e979b



More information about the pld-cvs-commit mailing list