Skip to content
Snippets Groups Projects
Commit c7490c8d authored by Felix Yan's avatar Felix Yan
Browse files

correct swig generated code

parent d69aa462
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ _pkgbase=pybox2d
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 @@ source=("$pkgbase-$pkgver.tar.gz::https://github.com/pybox2d/$_pkgbase/archive/$
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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment