Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Commit

Permalink
Disable Python debugging bits
Browse files Browse the repository at this point in the history
Patch out use of python-dbg, which is not available for other Python
versions. This should be sufficient that Drake can build. However, due
to some nasty business with libcrypt, which for some reason is not used
by Python 3.6, but is required by Python 3.7, we are not yet able to
produce a PyPI-usable wheel.

See also pypa/manylinux#305 for an explanation
of why this is broken.
  • Loading branch information
mwoehlke-kitware committed Sep 2, 2021
1 parent 320ed03 commit 049715f
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions image/pip-drake.patch
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,66 @@ index 7f41f9578..e0a227c46 100644
else:
fail("Operating system is NOT supported {}".format(os_result))

diff --git a/tools/py_toolchain/BUILD.bazel b/tools/py_toolchain/BUILD.bazel
index 411b638ff..891f51f8d 100644
--- a/tools/py_toolchain/BUILD.bazel
+++ b/tools/py_toolchain/BUILD.bazel
@@ -4,7 +4,6 @@ load("@rules_python//python:defs.bzl", "py_runtime", "py_runtime_pair")
load("//tools/lint:lint.bzl", "add_lint_tests")
load(
":interpreter_paths.bzl",
- "LINUX_DBG_INTERPRETER_PATH",
"LINUX_INTERPRETER_PATH",
"MACOS_INTERPRETER_PATH",
)
@@ -29,17 +28,6 @@ toolchain(
toolchain_type = "@rules_python//python:toolchain_type",
)

-py_runtime(
- name = "linux_dbg_py3_runtime",
- interpreter_path = LINUX_DBG_INTERPRETER_PATH,
- python_version = "PY3",
-)
-
-py_runtime_pair(
- name = "linux_dbg_py_runtime_pair",
- py3_runtime = ":linux_dbg_py3_runtime",
-)
-
# Typically this toolchain would be loaded manually using the
# --extra_toolchains command line option.
toolchain(
diff --git a/tools/py_toolchain/interpreter_paths.bzl b/tools/py_toolchain/interpreter_paths.bzl
index 1608e49b1..d6b5d5e07 100644
--- a/tools/py_toolchain/interpreter_paths.bzl
+++ b/tools/py_toolchain/interpreter_paths.bzl
@@ -2,13 +2,7 @@

# Default value of interpreter_path used by the py_runtime in the default
# Python toolchain registered on the @platforms//os:linux platform.
-LINUX_INTERPRETER_PATH = "/usr/bin/python3"
-
-# Default value of interpreter_path used by the py_runtime in the Python debug
-# toolchain registered on the @platforms//os:linux platform when the
-# --extra_toolchains=//tools/py_toolchain:linux_dbg_toolchain command line
-# option is given.
-LINUX_DBG_INTERPRETER_PATH = "/usr/bin/python3-dbg"
+LINUX_INTERPRETER_PATH = "/usr/local/bin/python"

# Default value of interpreter_path used by the py_runtime in the default
# Python toolchain registered on the @platforms//os:osx platform.
diff --git a/tools/ubuntu-bionic.bazelrc b/tools/ubuntu-bionic.bazelrc
index ecb718e37..98b65b42c 100644
--- a/tools/ubuntu-bionic.bazelrc
+++ b/tools/ubuntu-bionic.bazelrc
@@ -1,9 +1,3 @@
-build:_drd --extra_toolchains=//tools/py_toolchain:linux_dbg_toolchain
-build:_helgrind --extra_toolchains=//tools/py_toolchain:linux_dbg_toolchain
-
-# TODO(jamiesnape): Builds with configuration "memcheck" should also use
-# //tools/py_toolchain:linux_dbg_toolchain.
-
# Configure ${PATH} for actions.
# N.B. Ensure this is consistent with `execute.bzl`.
build --action_env=PATH=/usr/bin:/bin

0 comments on commit 049715f

Please sign in to comment.