-
Notifications
You must be signed in to change notification settings - Fork 593
Add support for Alpine to python feature
#1015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jonbackhaus
wants to merge
63
commits into
devcontainers:main
Choose a base branch
from
jonbackhaus:python-alpine
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 50 commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
77d36ba
fix: don't assume `yum` is available by default; otherwise, fail script
jonbackhaus 0d22f3c
feat: baseline alpine config, based on existing debian config and APK…
jonbackhaus da8f5f7
fix: remove nested quotes
jonbackhaus 01af53f
fix: add baseline packages
jonbackhaus 8659cc6
feat: support Alpine user/group management commands
jonbackhaus e121aa4
fix: wrong path for apk cache
jonbackhaus ad27565
fix: wrong command for adding a user to a group in Alpine
jonbackhaus 4c3fe15
fix: these packages don't exist in Alpine
jonbackhaus 2b94a42
fix: use `ack` for Alpine, since `grep` doesn't support PCRE
jonbackhaus 37d0cb9
fix: add `gpg`, `gpg-agent` packages (required for package signature …
jonbackhaus 0d5405b
perf: swap `alpine-sdk` for individual packages, from alpine docker i…
jonbackhaus d313b08
refactor: switch `case` statement to `if`
jonbackhaus 5cb60e6
feat: add build from source support for Alpine
jonbackhaus 125d71b
refactor: only install gpg, gpg-agent packages if building from source
jonbackhaus f3740fa
feat: fallback to non-relative symlink if not supported (e.g., Alpine…
jonbackhaus 6ef78c7
chore: bump minor revision (proposed)
jonbackhaus 170f53c
docs: add Alpine/apk to supported distros
jonbackhaus c58fa35
test: add test case for additional JupyterLab (Alpine)
jonbackhaus b283c0d
test: add test case for additional Python version/s (Alpine)
jonbackhaus 29b7c22
test: add test case for alternate Python tools (Alpine)
jonbackhaus 4159f5f
test: add test case for JupyterLab (Alpine)
jonbackhaus 19598ea
test: add test case for OS-provided Python (Alpine)
jonbackhaus b041608
test: add test case for Python shared lib (Alpine)
jonbackhaus 10a47e1
fix: use Devcontainer Alpine image as base (because it has `bash` ins…
jonbackhaus 2f6af5f
revert: switch back to PCRE-based grep for consistency
jonbackhaus 4715c20
refactor: move definition closer to usage
jonbackhaus 99e118b
refactor: define formal functions vs. variables as pseudo-functions
jonbackhaus 1866bd9
chore: remove OBE `ack` package (missed in earlier commit)
jonbackhaus ab54f4d
Merge branch 'main' into python-alpine
jonbackhaus 866d03e
Merge branch 'python-alpine' of github.com:jonbackhaus/devcontainer-f…
jonbackhaus cd1d7ad
fix: remove `--with-lto` option
jonbackhaus f6be63d
fix: remove `--enable-loadable-sqlite-extensions` option
jonbackhaus da59638
fix: remove `--with-system-expat` option
jonbackhaus 71c0b31
fix: remove `--build` option
jonbackhaus e992a23
fix: remove `-DTHREAD_STACK_SIZE` EXTRA_CFLAGS option
jonbackhaus cecf5f4
fix: remove `--enable-option-checking=fatal` option
jonbackhaus f05ad20
revert: remove flags (now OBE)
jonbackhaus c7609fd
chore: remove OBE packages
jonbackhaus 7393df3
style: reorder tests and clarify pip vs pip3
jonbackhaus 9838678
fix: add Alpine-specific packages for system/os-provided package
jonbackhaus 8ef3f47
test: fix: switch to non-root user for Alpine (similar to RHEL)
jonbackhaus ab58446
test: fix: switch to generic Alpine base
jonbackhaus 4adeb89
test: fix: switch to generic Alpine base
jonbackhaus 94b0bf1
Merge branch 'main' into python-alpine
jonbackhaus 565deff
Update test/python/scenarios.json
jonbackhaus 4ab847a
Merge branch 'main' into python-alpine
jonbackhaus 4a81865
test: fix: resolve inconsistencies in test configuration
jonbackhaus c2b546f
fix: force clean before initial package check/install, just in case t…
jonbackhaus 64713e1
fix: improve handling of grep install
jonbackhaus d25bf76
Merge branch 'main' into python-alpine
jonbackhaus 395e768
Merge branch 'main' into python-alpine
jonbackhaus ec8ec36
test: temporarily removing 'centos-7' test (fixed in another PR)
jonbackhaus acc390b
Merge branch 'main' into python-alpine
jonbackhaus 2ea3352
Merge branch 'main' into python-alpine
jonbackhaus b113acb
Merge branch 'main' into python-alpine
jonbackhaus 3680ccd
revert: ec8ec3621e7b4bfee39a9c18c25427e76f41730f
jonbackhaus e669f02
Merge branch 'main' into python-alpine
jonbackhaus 3b12464
Merge branch 'main' into python-alpine
jonbackhaus d93717b
Merge branch 'main' into python-alpine
jonbackhaus 83ccdc8
Merge branch 'main' into python-alpine
jonbackhaus 83d09d7
Merge branch 'main' into python-alpine
jonbackhaus 23dc88b
Merge branch 'main' into python-alpine
jonbackhaus 9ca6791
Merge branch 'main' into python-alpine
jonbackhaus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,40 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| # Optional: Import test library | ||
| source dev-container-features-test-lib | ||
|
|
||
| # Definition specific tests | ||
| check "version" python --version | ||
| check "pip is installed" pip --version | ||
| check "pip is installed" pip3 --version | ||
|
|
||
| # Check that tools can execute | ||
| check "autopep8" autopep8 --version | ||
| check "black" black --version | ||
| check "yapf" yapf --version | ||
| check "bandit" bandit --version | ||
| check "flake8" flake8 --version | ||
| check "mypy" mypy --version | ||
| check "pycodestyle" pycodestyle --version | ||
| check "pydocstyle" pydocstyle --version | ||
| check "pylint" pylint --version | ||
| check "pytest" pytest --version | ||
|
|
||
| # Check paths in settings | ||
| check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python" | ||
| check "current symlink works" /usr/local/python/current/bin/python --version | ||
| check "which autopep8" bash -c "which autopep8 | grep /usr/local/py-utils/bin/autopep8" | ||
| check "which black" bash -c "which black | grep /usr/local/py-utils/bin/black" | ||
| check "which yapf" bash -c "which yapf | grep /usr/local/py-utils/bin/yapf" | ||
| check "which bandit" bash -c "which bandit | grep /usr/local/py-utils/bin/bandit" | ||
| check "which flake8" bash -c "which flake8 | grep /usr/local/py-utils/bin/flake8" | ||
| check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy" | ||
| check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle" | ||
| check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle" | ||
| check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint" | ||
| check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest" | ||
|
|
||
| # Report result | ||
| reportResults |
This file contains hidden or 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,26 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| # Optional: Import test library | ||
| source dev-container-features-test-lib | ||
|
|
||
| # Always run these checks as the non-root user | ||
| user="$(whoami)" | ||
| check "user" grep vscode <<< "$user" | ||
|
|
||
| # Check for an installation of JupyterLab | ||
| check "version" jupyter lab --version | ||
|
|
||
| # Check location of JupyterLab installation | ||
| packages="$(python3 -m pip list)" | ||
| check "location" grep jupyter <<< "$packages" | ||
|
|
||
| # Check for git extension | ||
| check "jupyterlab_git" grep jupyterlab_git <<< "$packages" | ||
|
|
||
| # Check for correct JupyterLab configuration | ||
| check "config" grep ".*.allow_origin = '*'" /home/vscode/.jupyter/jupyter_server_config.py | ||
|
|
||
| # Report result | ||
| reportResults |
This file contains hidden or 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,39 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| # Optional: Import test library | ||
| source dev-container-features-test-lib | ||
|
|
||
| check "python version 3.11 installed as default" bash -c "python --version | grep 3.11" | ||
| check "python3 version 3.11 installed as default" bash -c "python3 --version | grep 3.11" | ||
| check "python version 3.10.5 installed" bash -c "ls -l /usr/local/python | grep 3.10.5" | ||
|
|
||
| # Check that tools can execute - make sure something didn't get messed up in this scenario | ||
| check "autopep8" autopep8 --version | ||
| check "black" black --version | ||
| check "yapf" yapf --version | ||
| check "bandit" bandit --version | ||
| check "flake8" flake8 --version | ||
| check "mypy" mypy --version | ||
| check "pycodestyle" pycodestyle --version | ||
| check "pydocstyle" pydocstyle --version | ||
| check "pylint" pylint --version | ||
| check "pytest" pytest --version | ||
|
|
||
| # Check paths in settings | ||
| check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python" | ||
| check "current symlink works" /usr/local/python/current/bin/python --version | ||
| check "which autopep8" bash -c "which autopep8 | grep /usr/local/py-utils/bin/autopep8" | ||
| check "which black" bash -c "which black | grep /usr/local/py-utils/bin/black" | ||
| check "which yapf" bash -c "which yapf | grep /usr/local/py-utils/bin/yapf" | ||
| check "which bandit" bash -c "which bandit | grep /usr/local/py-utils/bin/bandit" | ||
| check "which flake8" bash -c "which flake8 | grep /usr/local/py-utils/bin/flake8" | ||
| check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy" | ||
| check "which pycodestyle" bash -c "which pycodestyle | grep /usr/local/py-utils/bin/pycodestyle" | ||
| check "which pydocstyle" bash -c "which pydocstyle | grep /usr/local/py-utils/bin/pydocstyle" | ||
| check "which pylint" bash -c "which pylint | grep /usr/local/py-utils/bin/pylint" | ||
| check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest" | ||
|
|
||
| # Report result | ||
| reportResults |
This file contains hidden or 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,32 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| # Optional: Import test library | ||
| source dev-container-features-test-lib | ||
|
|
||
| # Definition specific tests | ||
| check "version" python --version | ||
| check "pip is installed" pip --version | ||
| check "pip is installed" pip3 --version | ||
|
|
||
| # Check that tools can execute | ||
| check "bandit" bandit --version | ||
| check "mypy" mypy --version | ||
| check "pipenv" pipenv --version | ||
| check "pytest" pytest --version | ||
| check "ruff" ruff --version | ||
| check "virtualenv" virtualenv --version | ||
|
|
||
| # Check paths in settings | ||
| check "current symlink is correct" bash -c "which python | grep /usr/local/python/current/bin/python" | ||
| check "current symlink works" /usr/local/python/current/bin/python --version | ||
| check "which bandit" bash -c "which bandit | grep /usr/local/py-utils/bin/bandit" | ||
| check "which mypy" bash -c "which mypy | grep /usr/local/py-utils/bin/mypy" | ||
| check "which pipenv" bash -c "which pipenv | grep /usr/local/py-utils/bin/pipenv" | ||
| check "which pytest" bash -c "which pytest | grep /usr/local/py-utils/bin/pytest" | ||
| check "which ruff" bash -c "which ruff | grep /usr/local/py-utils/bin/ruff" | ||
| check "which virtualenv" bash -c "which virtualenv | grep /usr/local/py-utils/bin/virtualenv" | ||
|
|
||
| # Report result | ||
| reportResults |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.