Skip to content

Commit

Permalink
mujoco v3.2.4 (#65)
Browse files Browse the repository at this point in the history
automerged PR by conda-forge/automerge-action
  • Loading branch information
github-actions[bot] authored Oct 21, 2024
2 parents c97ac16 + 9a6a935 commit 5b42dc1
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 4 deletions.
48 changes: 48 additions & 0 deletions recipe/2160.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
From 3bd4ae216e986b8030b9c0cec2eacf12eae2cbeb Mon Sep 17 00:00:00 2001
From: Silvio Traversaro <[email protected]>
Date: Mon, 21 Oct 2024 11:25:28 +0200
Subject: [PATCH] Fix running tests out of a installed mujoco python package

---
python/mujoco/specs_test.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/python/mujoco/specs_test.py b/python/mujoco/specs_test.py
index 84f10995be..9572a69ad6 100644
--- a/python/mujoco/specs_test.py
+++ b/python/mujoco/specs_test.py
@@ -15,9 +15,11 @@
"""Tests for mjSpec bindings."""

import inspect
+import os
import textwrap

from absl.testing import absltest
+from etils import epath
import mujoco
import numpy as np

@@ -433,7 +435,9 @@ def test_kwarg(self):
)

def test_load_xml(self):
- filename = '../../test/testdata/model.xml'
+ filename = os.path.join(
+ epath.resource_path("mujoco"), "testdata", "model.xml"
+ )
state_type = mujoco.mjtState.mjSTATE_INTEGRATION

# Load from file.
@@ -692,8 +696,9 @@ def test_include(self):
mujoco.mjtGeom.mjGEOM_BOX)

def test_delete(self):
- filename = '../../test/testdata/model.xml'
-
+ filename = os.path.join(
+ epath.resource_path("mujoco"), "testdata", "model.xml"
+ )
spec = mujoco.MjSpec.from_file(filename)

model = spec.compile()
2 changes: 2 additions & 0 deletions recipe/bld_py.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ set CMAKE_GENERATOR_PLATFORM=
set CMAKE_GENERATOR_TOOLSET=

cd %SRC_DIR%\python
# Workaround for missing pxr import https://github.com/conda-forge/mujoco-feedstock/pull/62
del /F .\mujoco\usd\exporter_test.py
bash make_sdist.sh
if errorlevel 1 exit 1

Expand Down
2 changes: 2 additions & 0 deletions recipe/build_py.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ if [[ "${target_platform}" == osx-* ]]; then
fi

cd $SRC_DIR/python
# Workaround for missing pxr import https://github.com/conda-forge/mujoco-feedstock/pull/62
rm -rf ./mujoco/usd/exporter_test.py
bash make_sdist.sh
cd dist
export MUJOCO_PATH=$PREFIX
Expand Down
10 changes: 6 additions & 4 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{% set name = "mujoco" %}
{% set namecxx = "libmujoco" %}
{% set namepython = "mujoco-python" %}
{% set version = "3.2.0" %}
{% set version = "3.2.4" %}

package:
name: {{ name }}
version: {{ version }}

source:
url: https://github.com/deepmind/mujoco/archive/refs/tags/{{ version }}.tar.gz
sha256: f389e786c143b4cba25c871695df0aed64736e78cbcc951815e934fdf7321d1d
sha256: 59d5d75dc66361aa3bdbdd409b96d7f6ecd86abcda06475233c796fc655b7b46
patches:
- python_remove_avx.patch
- cxx_devendor.patch
Expand All @@ -25,11 +25,12 @@ source:
- add_samples_prefix.patch
- add_simulate_prefix.patch
- 1477.patch
- 2160.patch

build:
# See https://github.com/conda-forge/mujoco-feedstock/issues/22
skip: true # [(aarch64 or ppc64le or osx) and python_impl == 'pypy']
number: 2
number: 0

outputs:
- name: {{ namecxx }}
Expand Down Expand Up @@ -252,7 +253,8 @@ outputs:
- pip
commands:
# pypy skipped as a workaround for https://github.com/conda-forge/mujoco-feedstock/issues/37
- pytest --pyargs mujoco -v -k "not render" # [python_impl != 'pypy']
# test_delete and test_load_xml disabled due to https://github.com/google-deepmind/mujoco/pull/2160
- pytest --pyargs mujoco -v -k "not (render or test_delete or test_load_xml)" # [python_impl != 'pypy']
- pip check
about:
home: https://github.com/deepmind/mujoco
Expand Down

0 comments on commit 5b42dc1

Please sign in to comment.