-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
35 additions
and
2 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
17 changes: 17 additions & 0 deletions
17
.devcontainer/features/python-deadsnakes/devcontainer-feature.json
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,17 @@ | ||
{ | ||
"id": "local.python-deadsnakes", | ||
"version": "1.0.0", | ||
"name": "Python (Deadsnakes PPA)", | ||
"description": "Installs prebuilt Python version from the deadsnakes PPA", | ||
"options": { | ||
"pythonVersion": { | ||
"type": "string", | ||
"proposals": ["3.12", "3.13", "3.14"], | ||
"default": "3.13", | ||
"description": "Select or enter the Python version (deadsnakes)." | ||
} | ||
}, | ||
"dependsOn": { | ||
"./features/common-deps": {} | ||
} | ||
} |
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,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
PYTHONVERSION=${PYTHONVERSION:-"3.13"} | ||
|
||
if [ "$(id -u)" -ne "0" ]; then echo "Must be run as root or with sudo"; exit 1; fi | ||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
add-apt-repository ppa:deadsnakes/ppa | ||
apt-get update -qq | ||
apt-get install -y -qq python${PYTHONVERSION} > /dev/null | ||
|
||
# Clean up | ||
apt clean | ||
rm -rf /var/lib/apt/lists/* |