(cmd_instance)
Set default values for options relating to `build_mjbindings`.
Set default values for options relating to `build_mjbindings`.
Set default values for options relating to build_mjbindings .
def _initialize_mjbindings_options(cmd_instance):
  """Set default values for options relating to `build_mjbindings`."""
  # A default value must be assigned to each user option here.
  cmd_instance.inplace = 0

  candidate_paths = []
  if PLATFORM == 'Linux':
    candidate_paths.append(os.path.expanduser('~/.mujoco/mujoco-2.1.1/include'))
    candidate_paths.append(os.path.expanduser('~/.mujoco/include'))
  elif PLATFORM == 'Darwin':
    framework_path = 'MuJoCo.Framework/Headers'
    candidate_paths.append(
        os.path.join(os.path.expanduser('~/.mujoco'), framework_path))
    candidate_paths.append(os.path.join(
        '/Applications/MuJoCo.App/Contents/Frameworks', framework_path))
  elif PLATFORM == 'Windows':
    candidate_paths.append(os.path.join(
        os.environ['HOMEDRIVE'], os.environ['HOMEPATH'], 'MuJoCo\\include'))
    candidate_paths.append(os.path.join(
        os.environ['PUBLIC'], 'MuJoCo\\include'))

  cmd_instance.headers_dir = ''
  for path in candidate_paths:
    if os.path.isdir(path):
      cmd_instance.headers_dir = path
      break
def _initialize_mjbindings_options ( cmd_instance ) : # A default value must be assigned to each user option here. cmd_instance . inplace = 0 candidate_paths = [ ] if PLATFORM == 'Linux' : candidate_paths . append ( os . path . expanduser ( '~/.mujoco/mujoco-2.1.1/include' ) ) candidate_paths . append ( os . path . expanduser ( '~/.mujoco/include' ) ) elif PLATFORM == 'Darwin' : framework_path = 'MuJoCo.Framework/Headers' candidate_paths . append ( os . path . join ( os . path . expanduser ( '~/.mujoco' ) , framework_path ) ) candidate_paths . append ( os . path . join ( '/Applications/MuJoCo.App/Contents/Frameworks' , framework_path ) ) elif PLATFORM == 'Windows' : candidate_paths . append ( os . path . join ( os . environ [ 'HOMEDRIVE' ] , os . environ [ 'HOMEPATH' ] , 'MuJoCo\\include' ) ) candidate_paths . append ( os . path . join ( os . environ [ 'PUBLIC' ] , 'MuJoCo\\include' ) ) cmd_instance . headers_dir = '' for path in candidate_paths : if os . path . isdir ( path ) : cmd_instance . headers_dir = path break