Commit 6696a919 authored by xiezhi's avatar xiezhi

multi version support

parent aa4e1721
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "Python 3.10 Development Environment", "name": "Python 3.10 Development Environment",
"image": "hb.eazytec-cloud.com/eazytec/eazydevelop-base:ubuntu", "image": "hb.eazytec-cloud.com/eazytec/eazydevelop-base:ubuntu",
"features": { "features": {
"ghcr.io/devcontainers/features/python:1.7.1": { "./python": {
"version": "3.10", "version": "3.10",
"installTools": true, "installTools": true,
"toolsToInstall": "black,flake8,mypy,pytest,pylint" "toolsToInstall": "black,flake8,mypy,pytest,pylint"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "Python Development Environment", "name": "Python Development Environment",
"image": "hb.eazytec-cloud.com/eazytec/eazydevelop-base:ubuntu", "image": "hb.eazytec-cloud.com/eazytec/eazydevelop-base:ubuntu",
"features": { "features": {
"ghcr.io/devcontainers/features/python:1.7.1": { "./python": {
"version": "3.11", "version": "3.11",
"installTools": true, "installTools": true,
"toolsToInstall": "black,flake8,mypy,pytest,pylint" "toolsToInstall": "black,flake8,mypy,pytest,pylint"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "Python 3.12 Development Environment", "name": "Python 3.12 Development Environment",
"image": "hb.eazytec-cloud.com/eazytec/eazydevelop-base:ubuntu", "image": "hb.eazytec-cloud.com/eazytec/eazydevelop-base:ubuntu",
"features": { "features": {
"ghcr.io/devcontainers/features/python:1.7.1": { "./python": {
"version": "3.12", "version": "3.12",
"installTools": true, "installTools": true,
"toolsToInstall": "black,flake8,mypy,pytest,pylint" "toolsToInstall": "black,flake8,mypy,pytest,pylint"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "Python 3.9 Development Environment", "name": "Python 3.9 Development Environment",
"image": "hb.eazytec-cloud.com/eazytec/eazydevelop-base:ubuntu", "image": "hb.eazytec-cloud.com/eazytec/eazydevelop-base:ubuntu",
"features": { "features": {
"ghcr.io/devcontainers/features/python:1.7.1": { "./python": {
"version": "3.9", "version": "3.9",
"installTools": true, "installTools": true,
"toolsToInstall": "black,flake8,mypy,pytest,pylint" "toolsToInstall": "black,flake8,mypy,pytest,pylint"
......
## OS Support
This Feature should work on recent versions of Debian/Ubuntu, RedHat Enterprise Linux, Fedora, Alma, and RockyLinux distributions with the apt, yum, dnf, or microdnf package manager installed.
`bash` is required to execute the `install.sh` script.
# Python (python)
Installs the provided version of Python, as well as PIPX, and other common Python utilities. JupyterLab is conditionally installed with the python feature. Note: May require source code compilation.
## Example Usage
```json
"features": {
"ghcr.io/devcontainers/features/python:1": {}
}
```
## Options
| Options Id | Description | Type | Default Value |
|-----|-----|-----|-----|
| version | Select a Python version to install. | string | os-provided |
| installTools | Flag indicating whether or not to install the tools specified via the 'toolsToInstall' option. Default is 'true'. | boolean | true |
| toolsToInstall | Comma-separated list of tools to install when 'installTools' is true. Defaults to a set of common Python tools like pylint. | string | flake8,autopep8,black,yapf,mypy,pydocstyle,pycodestyle,bandit,pipenv,virtualenv,pytest,pylint |
| optimize | Optimize Python for performance when compiled (slow) | boolean | false |
| enableShared | Enable building a shared Python library | boolean | false |
| installPath | The path where python will be installed. | string | /usr/local/python |
| installJupyterlab | Install JupyterLab, a web-based interactive development environment for notebooks | boolean | false |
| configureJupyterlabAllowOrigin | Configure JupyterLab to accept HTTP requests from the specified origin | string | - |
| httpProxy | Connect to GPG keyservers using a proxy for fetching source code signatures by configuring this option | string | - |
## Customizations
### VS Code Extensions
- `ms-python.python`
- `ms-python.vscode-pylance`
- `ms-python.autopep8`
## OS Support
This Feature should work on recent versions of Debian/Ubuntu, RedHat Enterprise Linux, Fedora, Alma, and RockyLinux distributions with the apt, yum, dnf, or microdnf package manager installed.
`bash` is required to execute the `install.sh` script.
---
_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/devcontainers/features/blob/main/src/python/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
{
"id": "python",
"version": "1.7.1",
"name": "Python",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/python",
"description": "Installs the provided version of Python, as well as PIPX, and other common Python utilities. JupyterLab is conditionally installed with the python feature. Note: May require source code compilation.",
"options": {
"version": {
"type": "string",
"proposals": [
"latest",
"os-provided",
"none",
"3.12",
"3.11",
"3.10",
"3.9",
"3.8",
"3.7",
"3.6"
],
"default": "os-provided",
"description": "Select a Python version to install."
},
"installTools": {
"type": "boolean",
"default": true,
"description": "Flag indicating whether or not to install the tools specified via the 'toolsToInstall' option. Default is 'true'."
},
"toolsToInstall": {
"type": "string",
"default": "flake8,autopep8,black,yapf,mypy,pydocstyle,pycodestyle,bandit,pipenv,virtualenv,pytest,pylint",
"description": "Comma-separated list of tools to install when 'installTools' is true. Defaults to a set of common Python tools like pylint."
},
"optimize": {
"type": "boolean",
"default": false,
"description": "Optimize Python for performance when compiled (slow)"
},
"enableShared": {
"type": "boolean",
"default": false,
"description": "Enable building a shared Python library"
},
"installPath": {
"type": "string",
"default": "/usr/local/python",
"description": "The path where python will be installed."
},
"installJupyterlab": {
"type": "boolean",
"default": false,
"description": "Install JupyterLab, a web-based interactive development environment for notebooks"
},
"configureJupyterlabAllowOrigin": {
"type": "string",
"default": "",
"description": "Configure JupyterLab to accept HTTP requests from the specified origin"
},
"httpProxy": {
"type": "string",
"default": "",
"description": "Connect to GPG keyservers using a proxy for fetching source code signatures by configuring this option"
}
},
"containerEnv": {
"PYTHON_PATH": "/usr/local/python/current",
"PIPX_HOME": "/usr/local/py-utils",
"PIPX_BIN_DIR": "/usr/local/py-utils/bin",
"PATH": "/usr/local/python/current/bin:/usr/local/py-utils/bin:/usr/local/jupyter:${PATH}"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.autopep8"
],
"settings": {
"github.copilot.chat.codeGeneration.instructions": [
{
"text": "This dev container includes `python3` and `pip3` pre-installed and available on the `PATH`, along with the Python language extensions for Python development."
}
],
"python.defaultInterpreterPath": "/usr/local/python/current/bin/python",
"[python]": {
"editor.defaultFormatter": "ms-python.autopep8"
}
}
}
},
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils",
"ghcr.io/devcontainers/features/oryx"
]
}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment