forked from RobotLocomotion/drake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python: Document Python3 support for Bionic
- Loading branch information
1 parent
9744053
commit 507752d
Showing
16 changed files
with
149 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# Import legacy .bazelrc file. | ||
import %workspace%/tools/bazel.rc | ||
|
||
# Import environment-specific configuration. | ||
# TODO(eric.cousineau): Make this required once CI is configured to always run | ||
# `install_prereqs_user_environment`. | ||
try-import %workspace%/gen/environment.bazelrc | ||
|
||
# Try to import user-specific configuration local to workspace. | ||
try-import %workspace%/user.bazelrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,3 +65,4 @@ xcode | |
|
||
external/ | ||
/user.bazelrc | ||
/gen/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
setup/ubuntu/source_distribution/install_prereqs_user_environment.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
# | ||
# Write user environment prerequisites for source distributions of Drake on | ||
# Ubuntu. | ||
|
||
set -euo pipefail | ||
|
||
if [[ "${EUID}" -eq 0 ]]; then | ||
echo 'This script must NOT be run as root' >&2 | ||
exit 1 | ||
fi | ||
|
||
workspace_dir="$(cd "$(dirname "${BASH_SOURCE}")/../../.." && pwd)" | ||
bazelrc="${workspace_dir}/gen/environment.bazelrc" | ||
codename=$(lsb_release -sc) | ||
|
||
mkdir -p "$(dirname "${bazelrc}")" | ||
cat > "${bazelrc}" <<EOF | ||
import %workspace%/tools/ubuntu-${codename}.bazelrc | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# N.B. Ensure we only use Homebrew's Python in `/usr/local`. | ||
|
||
# Use Python 2 by default. | ||
build --python_path=/usr/local/bin/python2 | ||
build --action_env=DRAKE_PYTHON_BIN_PATH=/usr/local/bin/python2 | ||
|
||
# Explicit configuration for Python 3. | ||
build:python3 --python_path=/usr/local/bin/python3 | ||
build:python3 --action_env=DRAKE_PYTHON_BIN_PATH=/usr/local/bin/python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Use Python 2 by default. | ||
build --python_path=/usr/bin/python2 | ||
build --action_env=DRAKE_PYTHON_BIN_PATH=/usr/bin/python2 | ||
|
||
# Explicit configuration for Python 3. | ||
build:python3 --python_path=/usr/bin/python3 | ||
build:python3 --action_env=DRAKE_PYTHON_BIN_PATH=/usr/bin/python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Use Python 2 by default. | ||
build --python_path=/usr/bin/python2 | ||
build --action_env=DRAKE_PYTHON_BIN_PATH=/usr/bin/python2 | ||
|
||
# Explicit configuration for Python 3. | ||
build:python3 --python_path=/usr/bin/python3 | ||
build:python3 --action_env=DRAKE_PYTHON_BIN_PATH=/usr/bin/python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters