]> git.pld-linux.org Git - packages/python-bs4.git/commitdiff
Use py_build/py_install, fix tests
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Thu, 26 Nov 2015 09:46:10 +0000 (10:46 +0100)
committerJacek Konieczny <j.konieczny@eggsoft.pl>
Thu, 26 Nov 2015 09:46:10 +0000 (10:46 +0100)
python-bs4.spec
test_suite.patch [new file with mode: 0644]

index d38f694d45bb13e8856ce18574ad024f74fa8831..c33b8684995d020ee520785f8e5ec9c96f644ab4 100644 (file)
@@ -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 (file)
index 0000000..a3a357f
--- /dev/null
@@ -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",
+ )
This page took 0.138428 seconds and 4 git commands to generate.