summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYour Name2023-03-03 00:55:51 +0800
committerYour Name2023-03-03 00:55:51 +0800
commit1a385a5954e7dbc62f5ea9b732b1bdbae99aa6ac (patch)
tree004d3f2cd5342a05d9d94e4cf861027f94e28082
parenta2745183a095e93aba60f6f122af6951d73c50dd (diff)
downloadaur-1a385a5954e7dbc62f5ea9b732b1bdbae99aa6ac.tar.gz
update 2.3.2
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD7
-rw-r--r--mujoco.patch82
3 files changed, 74 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4ffc2ba453b5..ff63f92d1b2a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = python-mujoco
pkgdesc = Mujoco's Python bindings
- pkgver = 2.2.2
+ pkgver = 2.3.2
pkgrel = 1
url = https://github.com/deepmind/mujoco
arch = x86_64
@@ -17,9 +17,9 @@ pkgbase = python-mujoco
depends = python-numpy
depends = python-opengl
depends = mujoco
- source = https://github.com/deepmind/mujoco/archive/refs/tags/2.2.2.tar.gz
+ source = https://github.com/deepmind/mujoco/archive/refs/tags/2.3.2.tar.gz
source = mujoco.patch
- sha256sums = 7aad590d2ec6056f0235021e493db014784452538e45513c4c022de22d8270b0
- sha256sums = 31871c9b0f3de7c004b5cd030bed5ab91b63f971bdb043aa7a0beee4af4d7a00
+ sha256sums = 85f0dd00ce6a167ae92049957f8d849ad07cd4d44b71b5e49cc66bd44552436c
+ sha256sums = b46b45f9672c3f483b1f2d71f1f879b0701d182f692524ff2f8bed39bd5c2a9b
pkgname = python-mujoco
diff --git a/PKGBUILD b/PKGBUILD
index 141fd6dcec4d..fcf03113da37 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,5 @@
pkgname=python-mujoco
-pkgver=2.2.2
+pkgver=2.3.2
pkgrel=1
pkgdesc="Mujoco's Python bindings"
depends=('python' 'absl-py' 'python-glfw' 'python-numpy' 'python-opengl' 'mujoco')
@@ -9,8 +9,8 @@ url="https://github.com/deepmind/mujoco"
license=('LGPL3')
source=("https://github.com/deepmind/mujoco/archive/refs/tags/$pkgver.tar.gz"
"mujoco.patch")
-sha256sums=('7aad590d2ec6056f0235021e493db014784452538e45513c4c022de22d8270b0'
- '31871c9b0f3de7c004b5cd030bed5ab91b63f971bdb043aa7a0beee4af4d7a00')
+sha256sums=('85f0dd00ce6a167ae92049957f8d849ad07cd4d44b71b5e49cc66bd44552436c'
+ 'b46b45f9672c3f483b1f2d71f1f879b0701d182f692524ff2f8bed39bd5c2a9b')
build() {
cd "${srcdir}/mujoco-${pkgver}"
@@ -21,6 +21,7 @@ build() {
cp ../LICENSE .
mkdir -p cmake
cp ../cmake/*.cmake cmake
+ cp -r ../simulate mujoco
python setup.py build
}
diff --git a/mujoco.patch b/mujoco.patch
index 745320e0aaad..cddcac0a1a0a 100644
--- a/mujoco.patch
+++ b/mujoco.patch
@@ -1,8 +1,8 @@
diff --git a/python/mujoco/CMakeLists.txt b/python/mujoco/CMakeLists.txt
-index 9e5242f..0573ffd 100644
+index 9160f4c..3237219 100644
--- a/python/mujoco/CMakeLists.txt
+++ b/python/mujoco/CMakeLists.txt
-@@ -119,7 +119,7 @@ endif()
+@@ -120,7 +120,7 @@ endif()
set(MUJOCO_PYTHON_ABSL_TARGETS absl::core_headers absl::flat_hash_map absl::span)
findorfetch(
USE_SYSTEM_PACKAGE
@@ -11,7 +11,7 @@ index 9e5242f..0573ffd 100644
PACKAGE_NAME
absl
LIBRARY_NAME
-@@ -152,7 +152,7 @@ endforeach()
+@@ -153,7 +153,7 @@ endforeach()
add_compile_definitions(EIGEN_MPL2_ONLY)
findorfetch(
USE_SYSTEM_PACKAGE
@@ -20,7 +20,7 @@ index 9e5242f..0573ffd 100644
PACKAGE_NAME
Eigen3
LIBRARY_NAME
-@@ -169,7 +169,7 @@ findorfetch(
+@@ -170,7 +170,7 @@ findorfetch(
# ==================== PYBIND11 ================================================
findorfetch(
USE_SYSTEM_PACKAGE
@@ -30,27 +30,30 @@ index 9e5242f..0573ffd 100644
pybind11
LIBRARY_NAME
diff --git a/python/mujoco/__init__.py b/python/mujoco/__init__.py
-index e33a132..a4754d7 100644
+index 3b2904b..5af302a 100644
--- a/python/mujoco/__init__.py
+++ b/python/mujoco/__init__.py
-@@ -53,6 +53,6 @@ if _MUJOCO_GL not in ('disable', 'disabled', 'off', 'false', '0'):
- else:
- from mujoco.glfw import GLContext
+@@ -46,8 +46,8 @@ from mujoco._structs import *
+ from mujoco.gl_context import *
+ from mujoco.renderer import Renderer
-HEADERS_DIR = os.path.join(os.path.dirname(__file__), 'include/mujoco')
-+HEADERS_DIR = os.path.join('/usr/include/', 'mujoco')
+-PLUGINS_DIR = os.path.join(os.path.dirname(__file__), 'plugin')
++HEADERS_DIR = '/usr/include/mujoco'
++PLUGINS_DIR = '/usr/lib/mujoco/plugins'
+
+ PLUGIN_HANDLES = []
- __version__ = mj_versionString() # pylint: disable=undefined-variable
diff --git a/python/setup.py b/python/setup.py
-index d82274e..64583e2 100644
+index 610b858..1b58438 100644
--- a/python/setup.py
+++ b/python/setup.py
-@@ -140,14 +140,14 @@ class BuildCMakeExtension(build_ext.build_ext):
- self._is_apple = (platform.system() == 'Darwin')
+@@ -150,15 +150,12 @@ class BuildCMakeExtension(build_ext.build_ext):
(self._mujoco_library_path,
self._mujoco_include_path,
+ self._mujoco_plugins_path,
- self._mujoco_framework_path) = self._find_mujoco()
-+ self._mujoco_framework_path) = "/usr/lib","/usr/include/mujoco",None
++ self._mujoco_framework_path) = "/usr/lib","/usr/include/mujoco","/usr/lib/mujoco/plugins",None
self._configure_cmake()
for ext in self.extensions:
assert ext.name.startswith(EXT_PREFIX)
@@ -58,8 +61,55 @@ index d82274e..64583e2 100644
self.build_extension(ext)
- self._copy_external_libraries()
- self._copy_mujoco_headers()
-+ #self._copy_external_libraries()
-+ #self._copy_mujoco_headers()
+- self._copy_plugin_libraries()
def _find_mujoco(self):
if MUJOCO_PATH not in os.environ:
+diff --git a/simulate/CMakeLists.txt b/simulate/CMakeLists.txt
+index c120a1f..c2f75c6 100644
+--- a/simulate/CMakeLists.txt
++++ b/simulate/CMakeLists.txt
+@@ -116,8 +116,13 @@ target_include_directories(
+ platform_ui_adapter
+ PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}
+- $<TARGET_PROPERTY:glfw,INTERFACE_INCLUDE_DIRECTORIES>
+ )
++# Upstream MuJoCo is carefully not linking glfw here, and so it is just include its directories
++# to avoid dealing with two copies of glfw. In conda-forge (or in any C++/Python distribution)
++# pyglfw will depend on the same glfw copy linked here, so we can just link glfw normally
++# This avoids the tricky cmake bug https://gitlab.kitware.com/cmake/cmake/-/issues/19072
++# target_include_directories(platform_ui_adapter PUBLIC glfw)
++target_link_libraries(platform_ui_adapter PUBLIC glfw)
+ target_link_libraries(platform_ui_adapter PUBLIC mujoco::mujoco)
+ if(SIMULATE_GLFW_DYNAMIC_SYMBOLS)
+ target_compile_definitions(platform_ui_adapter PUBLIC mjGLFW_DYNAMIC_SYMBOLS)
+diff --git a/simulate/cmake/SimulateDependencies.cmake b/simulate/cmake/SimulateDependencies.cmake
+index fa539c2..eb0b95a 100644
+--- a/simulate/cmake/SimulateDependencies.cmake
++++ b/simulate/cmake/SimulateDependencies.cmake
+@@ -22,12 +22,12 @@ else()
+ endif()
+
+ option(MUJOCO_SIMULATE_USE_SYSTEM_MUJOCO "Use installed MuJoCo version."
+- ${DEFAULT_USE_SYSTEM_MUJOCO}
++ ON
+ )
+ unset(DEFAULT_USE_SYSTEM_MUJOCO)
+
+-option(MUJOCO_SIMULATE_USE_SYSTEM_MUJOCO "Use installed MuJoCo version." OFF)
+-option(MUJOCO_SIMULATE_USE_SYSTEM_GLFW "Use installed GLFW version." OFF)
++option(MUJOCO_SIMULATE_USE_SYSTEM_MUJOCO "Use installed MuJoCo version." ON)
++option(MUJOCO_SIMULATE_USE_SYSTEM_GLFW "Use installed GLFW version." ON)
+
+ set(MUJOCO_DEP_VERSION_glfw3
+ 7482de6071d21db77a7236155da44c172a7f6c9e # 3.3.8
+@@ -59,7 +59,7 @@ findorfetch(
+ )
+
+ option(MUJOCO_EXTRAS_STATIC_GLFW
+- "Link MuJoCo sample apps and simulate libraries against GLFW statically." ON
++ "Link MuJoCo sample apps and simulate libraries against GLFW statically." OFF
+ )
+ if(MUJOCO_EXTRAS_STATIC_GLFW)
+ set(BUILD_SHARED_LIBS_OLD ${BUILD_SHARED_LIBS})