Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 May 2021 18:32:47 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 8f7ccf0124d5 - main - devel/py-bullet3: Update 3.09 -> 3.17
Message-ID:  <202105161832.14GIWlPA020733@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8f7ccf0124d5f8c2cd563a5c80dd18902b322781

commit 8f7ccf0124d5f8c2cd563a5c80dd18902b322781
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2021-05-16 17:51:05 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2021-05-16 18:32:37 +0000

    devel/py-bullet3: Update 3.09 -> 3.17
    
    Also:
    * Add missing dependencies
    * Add the test target based on the example from the documentation
    
    Reported by:    portscout
---
 devel/py-bullet3/Makefile      | 10 ++++++++--
 devel/py-bullet3/distinfo      |  6 +++---
 devel/py-bullet3/files/test.py | 17 +++++++++++++++++
 3 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/devel/py-bullet3/Makefile b/devel/py-bullet3/Makefile
index 34906bb68480..bcf9e9349e6c 100644
--- a/devel/py-bullet3/Makefile
+++ b/devel/py-bullet3/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	bullet3
-DISTVERSION=	3.09
+DISTVERSION=	3.17
 CATEGORIES=	devel
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -9,8 +9,11 @@ COMMENT=	Python version of 3D collision detection library Bullet
 LICENSE=	ZLIB
 LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
+RUN_DEPENDS=	${PYNUMPY} \
+		${PYTHON_PKGNAMEPREFIX}gym>0:math/py-gym@${PY_FLAVOR}
+
 USES=		compiler:c++11-lang gl localbase python:3.6+
-USE_PYTHON=	autoplist distutils
+USE_PYTHON=	distutils autoplist
 USE_GL=		gl glew
 
 USE_GITHUB=	yes
@@ -19,4 +22,7 @@ GH_ACCOUNT=	bulletphysics
 post-install:
 	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/pybullet*.so
 
+do-test: install # test require graphical environment
+	@${PYTHON_CMD} ${FILESDIR}/test.py
+
 .include <bsd.port.mk>
diff --git a/devel/py-bullet3/distinfo b/devel/py-bullet3/distinfo
index ac38f69c0828..86991172c2a3 100644
--- a/devel/py-bullet3/distinfo
+++ b/devel/py-bullet3/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1614982042
-SHA256 (bulletphysics-bullet3-3.09_GH0.tar.gz) = f2feef9322329c0571d9066fede2db0ede92b19f7f7fdf54def3b4651f02af03
-SIZE (bulletphysics-bullet3-3.09_GH0.tar.gz) = 129274815
+TIMESTAMP = 1621185390
+SHA256 (bulletphysics-bullet3-3.17_GH0.tar.gz) = baa642c906576d4d98d041d0acb80d85dd6eff6e3c16a009b1abf1ccd2bc0a61
+SIZE (bulletphysics-bullet3-3.17_GH0.tar.gz) = 131995187
diff --git a/devel/py-bullet3/files/test.py b/devel/py-bullet3/files/test.py
new file mode 100644
index 000000000000..935f98e87108
--- /dev/null
+++ b/devel/py-bullet3/files/test.py
@@ -0,0 +1,17 @@
+import pybullet as p
+import time
+import pybullet_data
+
+physicsClient = p.connect(p.GUI)#or p.DIRECT for non-graphical version
+p.setAdditionalSearchPath(pybullet_data.getDataPath()) #optionally
+p.setGravity(0,0,-10)
+planeId = p.loadURDF("plane.urdf")
+cubeStartPos = [0,0,1]
+cubeStartOrientation = p.getQuaternionFromEuler([0,0,0])
+boxId = p.loadURDF("r2d2.urdf",cubeStartPos, cubeStartOrientation)
+for i in range (10000):
+  p.stepSimulation()
+  time.sleep(1./240.)
+cubePos, cubeOrn = p.getBasePositionAndOrientation(boxId)
+print(cubePos,cubeOrn)
+p.disconnect()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105161832.14GIWlPA020733>