Skip to content

Commit

Permalink
Disable Drake Visualizer on macOS
Browse files Browse the repository at this point in the history
Drake Visualizer is disabled for at least as long as it takes to transition
Drake and VTK 8.2 to Python 3.9 or some alternative solution is found, see
RobotLocomotion#14650 for updates.
  • Loading branch information
Jamie Snape committed Feb 17, 2021
1 parent dc773bb commit 5a27fba
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/workspace/drake_visualizer/drake_visualizer_bazel.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
# or `bazel run`.
sys.dont_write_bytecode = True # noqa

if sys.platform == "darwin":
print("ERROR: Drake Visualizer is disabled on macOS", file=sys.stderr)
sys.exit(0)

from _drake_visualizer_builtin_scripts import (
_exec_drake_visualizer_with_plugins,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ match that of the real `drake-visualizer` binary.
from os.path import isdir, join, dirname, realpath
import sys

if sys.platform == "darwin":
print("ERROR: Drake Visualizer is disabled on macOS", file=sys.stderr)
sys.exit(0)

# Ensure that we can import the necessary scripts, accommodating symlinks.
PREFIX_DIR = dirname(dirname(realpath(__file__)))
assert isdir(join(PREFIX_DIR, "bin")), f"Bad location: {PREFIX_DIR}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from os.path import isfile
import subprocess
import sys
import unittest


class TestDrakeVisualizerBazel(unittest.TestCase):
@unittest.skipIf(sys.platform == "darwin",
"Drake Visualizer is disabled on macOS")
def test_help(self):
"""Ensure we can call drake_visualizer --help in Bazel."""
bin_path = "tools/drake_visualizer"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from os.path import join
import sys
import unittest

import install_test_helper


class TestDrakeVisualizerInstalled(unittest.TestCase):
@unittest.skipIf(sys.platform == "darwin",
"Drake Visualizer is disabled on macOS")
def test_help(self):
"""Ensures we can call `./bin/drake-visualizer --help` from install."""
# Get install directory.
Expand Down

0 comments on commit 5a27fba

Please sign in to comment.