Skip to content

Commit 30e03b6

Browse files
jdputschadiJeff Putsch
andauthored
Add RHEL support to the python feature (#830)
* install gpg2.22 on centos 7 when installing python * RHEL support, exisiting tests pass, new RHEL tests pass. * add tests, cleanup install organization * update testing to include RHEL tests * update testing to include RHEL tests * undo addition of installing additional pip modules * fix errors installing os-provided Python on recent Debian systems and on Mariner systems * adjust to properly use newly installed python (PYTHON_SRC) instead of assuming "python" will work * When installing pipx, check if python is marked as externally managed. If so, add "--break-system-packages" to the pip install flags. This does not really breack system packages due to the setting of PYTHONUSERBASE during the install of pipx, but does get us past checks for installing python packages into the system python install. * merge from main * update check for managed python install. pass all tests. * add "packages" option from PR #768 * remove "packages" option * Address PR feedback, passes all tests locally. * fix install error on centos --------- Co-authored-by: Jeff Putsch <jputsch@analog.com>
1 parent 1592dd5 commit 30e03b6

23 files changed

Lines changed: 1073 additions & 76 deletions

.github/workflows/test-pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767

6868
test-scenarios:
6969
needs: [detect-changes]
70-
runs-on: ubuntu-latest
70+
runs-on: devcontainer-image-builder-ubuntu
7171
continue-on-error: true
7272
strategy:
7373
matrix:

src/python/NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
## OS Support
44

5-
This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed.
5+
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.
66

77
`bash` is required to execute the `install.sh` script.

src/python/devcontainer-feature.json

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "python",
3-
"version": "1.3.2",
3+
"version": "1.4.0",
44
"name": "Python",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/python",
66
"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.",
@@ -25,13 +25,23 @@
2525
"installTools": {
2626
"type": "boolean",
2727
"default": true,
28-
"description": "Install common Python tools like pylint"
28+
"description": "Flag indicating whether or not to install the tools specified via the 'toolsToInstall' option. Default is 'true'."
29+
},
30+
"toolsToInstall": {
31+
"type": "string",
32+
"default": "flake8,autopep8,black,yapf,mypy,pydocstyle,pycodestyle,bandit,pipenv,virtualenv,pytest,pylint",
33+
"description": "Comma-separated list of tools to install when 'installTools' is true. Defaults to a set of common Python tools like pylint."
2934
},
3035
"optimize": {
3136
"type": "boolean",
3237
"default": false,
3338
"description": "Optimize Python for performance when compiled (slow)"
3439
},
40+
"enableShared": {
41+
"type": "boolean",
42+
"default": false,
43+
"description": "Enable building a shared Python library"
44+
},
3545
"installPath": {
3646
"type": "string",
3747
"default": "/usr/local/python",
@@ -71,7 +81,7 @@
7181
}
7282
},
7383
"installsAfter": [
74-
"ghcr.io/devcontainers/features/common-utils",
75-
"ghcr.io/devcontainers/features/oryx"
84+
"ghcr.io/devcontainers/features/common-utils",
85+
"ghcr.io/devcontainers/features/oryx"
7686
]
77-
}
87+
}

0 commit comments

Comments
 (0)