This repository has been archived by the owner on Oct 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start adding support for multiple Python versions
Twiddle Python setup to use a virtualenv, and to accept an argument to select which Python version to use. Split Python setup to a separate provisioning step so that the other bits can live in a shared image. This seems to be close to "good enough" to make Drake actually build, mostly by virtue of shoving a bunch of symlinks to the appropriate Python version stuff straight into /usr.
- Loading branch information
1 parent
51f5efe
commit 320ed03
Showing
3 changed files
with
33 additions
and
13 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
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,21 @@ | ||
#!/bin/bash -e | ||
|
||
PYTHON=python${1:-3} | ||
|
||
# Set up Python environment and install Python prerequisites | ||
apt-get -y install --no-install-recommends \ | ||
${PYTHON}-dev lib${PYTHON}-dev ${PYTHON}-venv | ||
|
||
${PYTHON} -m venv /usr/local | ||
|
||
pip install \ | ||
pyyaml \ | ||
semantic-version \ | ||
setuptools \ | ||
wheel \ | ||
auditwheel | ||
|
||
ln -s /usr/bin/${PYTHON}-config /usr/bin/python3-config | ||
ln -s /usr/bin/${PYTHON}-config /usr/local/bin/python-config | ||
ln -s /usr/local/bin/python /usr/bin/python | ||
ln -s /usr/include/${PYTHON}m /usr/local/include/ |