[arch-commits] Commit in python-pybox2d/trunk (PKGBUILD)

Felix Yan felixonmars at archlinux.org
Tue Nov 12 07:34:42 UTC 2019


    Date: Tuesday, November 12, 2019 @ 07:34:42
  Author: felixonmars
Revision: 526953

upgpkg: python-pybox2d 1:2.3.2-4

correct swig generated code

Modified:
  python-pybox2d/trunk/PKGBUILD

----------+
 PKGBUILD |   16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-11-12 05:06:16 UTC (rev 526952)
+++ PKGBUILD	2019-11-12 07:34:42 UTC (rev 526953)
@@ -5,7 +5,7 @@
 pkgbase=python-pybox2d
 pkgname=('python-pybox2d' 'python2-pybox2d')
 pkgver=2.3.2
-pkgrel=3
+pkgrel=4
 epoch=1
 pkgdesc='Python wrapper for Box2D'
 arch=('x86_64')
@@ -16,19 +16,29 @@
 sha256sums=('ca7111557df3ecda3cb48b6c5fb3290fa8b45b6226a34867d2a85cbee5747266')
 
 prepare() {
+	# Generate py library properly
+	rm $_pkgbase-$pkgver/library/Box2D/Box2D.py
 	cp -a $_pkgbase-$pkgver{,-python2}
 }
 
 build() {
 	cd $_pkgbase-$pkgver
-	python setup.py setopt --command=build_ext --option=swig --set-value=swig
+	swig -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library/Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D/Box2D_wrap.cpp Box2D/Box2D.i
 	python setup.py build
 
 	cd ../$_pkgbase-$pkgver-python2
-	python2 setup.py setopt --command=build_ext --option=swig --set-value=swig
+	swig -python -c++ -IBox2D -small -O -includeall -ignoremissing -w201 -globals b2Globals -outdir library/Box2D -keyword -w511 -D_SWIG_KWARGS -o Box2D/Box2D_wrap.cpp Box2D/Box2D.i
 	python2 setup.py build
 }
 
+check() {
+	cd $_pkgbase-$pkgver
+	python setup.py test
+
+	cd ../$_pkgbase-$pkgver-python2
+	python2 setup.py test || warning "Tests failed"
+}
+
 package_python-pybox2d() {
 	depends=('python')
 



More information about the arch-commits mailing list