diff options
author | Eric Langlois | 2022-03-24 01:01:45 -0400 |
---|---|---|
committer | Eric Langlois | 2022-03-24 01:01:45 -0400 |
commit | 0056383f149ae3f9232f1d2dbf2bfbf8a4502f8b (patch) | |
tree | 2214229373b5ec0e451eeb7e8c674c1ae290fb59 | |
parent | aae6aaec0112440284ab1ded73d71bf11df4d2ad (diff) | |
download | aur-0056383f149ae3f9232f1d2dbf2bfbf8a4502f8b.tar.gz |
upgpkg: python-mujoco-py 2.1.2.14-2
Update for mujoco 2.1.3 using libmujoco (without version number)
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | mujoco-py.patch | 41 |
3 files changed, 31 insertions, 14 deletions
@@ -1,7 +1,7 @@ pkgbase = python-mujoco-py pkgdesc = Python interface to the MuJoCo physics engine pkgver = 2.1.2.14 - pkgrel = 1 + pkgrel = 2 url = https://github.com/openai/mujoco-py arch = x86_64 license = MIT @@ -2,7 +2,7 @@ pkgname=python-mujoco-py _name=${pkgname#python-} pkgver=2.1.2.14 -pkgrel=1 +pkgrel=2 pkgdesc="Python interface to the MuJoCo physics engine" arch=('x86_64') url="https://github.com/openai/mujoco-py" diff --git a/mujoco-py.patch b/mujoco-py.patch index 9bb7d505d63f..2ab1c14296b7 100644 --- a/mujoco-py.patch +++ b/mujoco-py.patch @@ -1,6 +1,6 @@ diff '--color=auto' --unified --recursive --text mujoco-py-2.1.2.14.orig/mujoco_py/builder.py mujoco-py-2.1.2.14.new/mujoco_py/builder.py ---- mujoco-py-2.1.2.14.orig/mujoco_py/builder.py 2021-12-02 03:51:35.827128615 -0500 -+++ mujoco-py-2.1.2.14.new/mujoco_py/builder.py 2021-12-02 04:07:00.863927035 -0500 +--- mujoco-py-2.1.2.14.orig/mujoco_py/builder.py 2022-03-24 00:41:08.622171029 -0400 ++++ mujoco-py-2.1.2.14.new/mujoco_py/builder.py 2022-03-24 00:42:23.291497507 -0400 @@ -71,9 +71,7 @@ if sys.platform == 'darwin': Builder = MacExtensionBuilder @@ -25,6 +25,17 @@ diff '--color=auto' --unified --recursive --text mujoco-py-2.1.2.14.orig/mujoco_ lockpath = os.path.join(os.path.dirname(cext_so_path), 'mujocopy-buildlock') with fasteners.InterProcessLock(lockpath): +@@ -177,8 +182,8 @@ + + # Fix the rpath of the generated library -- i lost the Stackoverflow + # reference here +- from_mujoco_path = '@executable_path/libmujoco210.dylib' +- to_mujoco_path = '%s/libmujoco210.dylib' % mj_bin_path ++ from_mujoco_path = '@executable_path/libmujoco.dylib' ++ to_mujoco_path = '%s/libmujoco.dylib' % mj_bin_path + subprocess.check_call(['install_name_tool', + '-change', + from_mujoco_path, @@ -210,11 +215,10 @@ sources=[join(self.CYMJ_DIR_PATH, "cymj.pyx")], include_dirs=[ @@ -33,8 +44,9 @@ diff '--color=auto' --unified --recursive --text mujoco-py-2.1.2.14.orig/mujoco_ + "/usr/include/mujoco", np.get_include(), ], - libraries=['mujoco210'], +- libraries=['mujoco210'], - library_dirs=[join(mujoco_path, 'bin')], ++ libraries=['mujoco'], extra_compile_args=[ '-fopenmp', # needed for OpenMP '-w', # suppress numpy compilation warnings @@ -49,8 +61,9 @@ diff '--color=auto' --unified --recursive --text mujoco-py-2.1.2.14.orig/mujoco_ def _build_impl(self): so_file_path = super()._build_impl() # Removes absolute paths to libraries. Allows for dynamic loading. - fix_shared_library(so_file_path, 'libmujoco210.so', 'libmujoco210.so') +- fix_shared_library(so_file_path, 'libmujoco210.so', 'libmujoco210.so') - fix_shared_library(so_file_path, 'libglewosmesa.so', 'libglewosmesa.so') ++ fix_shared_library(so_file_path, 'libmujoco.so', 'libmujoco.so') + fix_shared_library(so_file_path, 'libGLEW.so', 'libGLEW.so') return so_file_path @@ -67,26 +80,29 @@ diff '--color=auto' --unified --recursive --text mujoco-py-2.1.2.14.orig/mujoco_ so_file_path = super()._build_impl() fix_shared_library(so_file_path, 'libOpenGL.so', 'libOpenGL.so.0') fix_shared_library(so_file_path, 'libEGL.so', 'libEGL.so.1') - fix_shared_library(so_file_path, 'libmujoco210.so', 'libmujoco210.so') +- fix_shared_library(so_file_path, 'libmujoco210.so', 'libmujoco210.so') - fix_shared_library(so_file_path, 'libglewegl.so', 'libglewegl.so') ++ fix_shared_library(so_file_path, 'libmujoco.so', 'libmujoco.so') + fix_shared_library(so_file_path, 'libGLEW.so', 'libGLEW.so') return so_file_path -@@ -481,8 +483,7 @@ +@@ -481,9 +483,8 @@ source_string += '\nuintptr_t __fun = (uintptr_t) fun;' # Link against mujoco so we can call mujoco functions from within callback ffibuilder.set_source(name, source_string, - include_dirs=[join(mujoco_path, 'include')], - library_dirs=[join(mujoco_path, 'bin')], +- libraries=['mujoco210']) + include_dirs=["/usr/include/mujoco"], - libraries=['mujoco210']) ++ libraries=['mujoco']) # Catch compilation exceptions so we can cleanup partial files in that case try: + library_path = ffibuilder.compile(verbose=True) diff '--color=auto' --unified --recursive --text mujoco-py-2.1.2.14.orig/mujoco_py/utils.py mujoco-py-2.1.2.14.new/mujoco_py/utils.py ---- mujoco-py-2.1.2.14.orig/mujoco_py/utils.py 2021-12-02 03:51:35.837128511 -0500 -+++ mujoco-py-2.1.2.14.new/mujoco_py/utils.py 2021-12-02 04:02:43.413373188 -0500 -@@ -61,7 +61,6 @@ +--- mujoco-py-2.1.2.14.orig/mujoco_py/utils.py 2022-03-24 00:41:08.625504331 -0400 ++++ mujoco-py-2.1.2.14.new/mujoco_py/utils.py 2022-03-24 00:42:48.474603679 -0400 +@@ -61,14 +61,15 @@ def discover_mujoco(): """ Discovers where MuJoCo is located in the file system. @@ -94,10 +110,11 @@ diff '--color=auto' --unified --recursive --text mujoco-py-2.1.2.14.orig/mujoco_ Returns: - mujoco_path (str): Path to MuJoCo 2.1 directory. -@@ -69,6 +68,8 @@ + """ mujoco_path = os.getenv('MUJOCO_PY_MUJOCO_PATH') if not mujoco_path: - mujoco_path = join(expanduser('~'), '.mujoco', 'mujoco210') +- mujoco_path = join(expanduser('~'), '.mujoco', 'mujoco210') ++ mujoco_path = join(expanduser('~'), '.mujoco', 'mujoco') + if not exists(mujoco_path): + mujoco_path = "/opt/mujoco" |