Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
devcontainer-features
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eazydevelop-devcontainer-temp
devcontainer-features
Commits
f7f05f76
Unverified
Commit
f7f05f76
authored
Nov 11, 2022
by
Chuck Lantz
Committed by
GitHub
Nov 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regression with Azure CLI, privs (#272)
parent
3020d6da
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
13 deletions
+25
-13
devcontainer-feature.json
src/python/devcontainer-feature.json
+1
-1
install.sh
src/python/install.sh
+20
-12
install_additional_python.sh
test/python/install_additional_python.sh
+1
-0
install_os_provided_python.sh
test/python/install_os_provided_python.sh
+1
-0
install_via_oryx.sh
test/python/install_via_oryx.sh
+1
-0
test.sh
test/python/test.sh
+1
-0
No files found.
src/python/devcontainer-feature.json
View file @
f7f05f76
{
"id"
:
"python"
,
"version"
:
"1.0.1
1
"
,
"version"
:
"1.0.1
2
"
,
"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."
,
...
...
src/python/install.sh
View file @
f7f05f76
...
...
@@ -340,17 +340,24 @@ add_user_jupyter_config() {
install_python
()
{
version
=
$1
# If the os-provided versions are "good enough", detect that and bail out.
if
[
${
PYTHON_VERSION
}
=
"os-provided"
]
||
[
${
PYTHON_VERSION
}
=
"system"
]
;
then
if
[
${
version
}
=
"os-provided"
]
||
[
${
version
}
=
"system"
]
;
then
check_packages python3 python3-doc python3-pip python3-venv python3-dev python3-tk
INSTALL_PATH
=
"/usr"
ln
-s
"
${
INSTALL_PATH
}
/bin/python3"
"
${
INSTALL_PATH
}
/bin/python"
ln
-s
"
${
INSTALL_PATH
}
/bin/pydoc3"
"
${
INSTALL_PATH
}
/bin/pydoc"
ln
-s
"
${
INSTALL_PATH
}
/bin/python3-config"
"
${
INSTALL_PATH
}
/bin/python-config"
# Add the current symlink but point it to "/usr" since python is at /usr/bin/python
mkdir
-p
"
${
PYTHON_INSTALL_PATH
}
"
add_symlink
local
current_bin_path
=
"
${
CURRENT_PATH
}
/bin"
if
[
"
${
OVERRIDE_DEFAULT_VERSION
}
"
=
"true"
]
;
then
rm
-rf
"
${
current_bin_path
}
"
fi
if
[
!
-d
"
${
current_bin_path
}
"
]
;
then
mkdir
-p
"
${
current_bin_path
}
"
# Add an interpreter symlink but point it to "/usr" since python is at /usr/bin/python, add other alises
ln
-s
"
${
INSTALL_PATH
}
/bin/python3"
"
${
current_bin_path
}
/python3"
ln
-s
"
${
INSTALL_PATH
}
/bin/python3"
"
${
current_bin_path
}
/python"
ln
-s
"
${
INSTALL_PATH
}
/bin/pydoc3"
"
${
current_bin_path
}
/pydoc3"
ln
-s
"
${
INSTALL_PATH
}
/bin/pydoc3"
"
${
current_bin_path
}
/pydoc"
ln
-s
"
${
INSTALL_PATH
}
/bin/python3-config"
"
${
current_bin_path
}
/python3-config"
ln
-s
"
${
INSTALL_PATH
}
/bin/python3-config"
"
${
current_bin_path
}
/python-config"
fi
should_install_from_source
=
false
elif
[
"
$(
dpkg
--print-architecture
)
"
=
"amd64"
]
&&
[
"
${
USE_ORYX_IF_AVAILABLE
}
"
=
"true"
]
&&
type
oryx
>
/dev/null 2>&1
;
then
...
...
@@ -399,12 +406,13 @@ if [ "${PYTHON_VERSION}" != "none" ]; then
if
[
${
PYTHON_VERSION
}
!=
"os-provided"
]
&&
[
${
PYTHON_VERSION
}
!=
"system"
]
;
then
updaterc
"if [[
\"\$
{PATH}
\"
!= *
\"
${
CURRENT_PATH
}
/bin
\"
* ]]; then export PATH=
${
CURRENT_PATH
}
/bin:
\$
{PATH}; fi"
chown
-R
"
${
USERNAME
}
:python"
"
${
PYTHON_INSTALL_PATH
}
"
chmod
-R
g+r+w
"
${
PYTHON_INSTALL_PATH
}
"
find
"
${
PYTHON_INSTALL_PATH
}
"
-type
d
-print0
| xargs
-0
-n
1
chmod
g+s
PATH
=
"
${
INSTALL_PATH
}
/bin:
${
PATH
}
"
fi
# Updates the symlinks for os-provided, or the installed python version in other cases
chown
-R
"
${
USERNAME
}
:python"
"
${
PYTHON_INSTALL_PATH
}
"
chmod
-R
g+r+w
"
${
PYTHON_INSTALL_PATH
}
"
find
"
${
PYTHON_INSTALL_PATH
}
"
-type
d
-print0
| xargs
-0
-n
1
chmod
g+s
fi
# Install Python tools if needed
...
...
test/python/install_additional_python.sh
View file @
f7f05f76
...
...
@@ -24,6 +24,7 @@ check "pylint" pylint --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"
...
...
test/python/install_os_provided_python.sh
View file @
f7f05f76
...
...
@@ -23,6 +23,7 @@ check "pylint" pylint --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"
...
...
test/python/install_via_oryx.sh
View file @
f7f05f76
...
...
@@ -23,6 +23,7 @@ check "pylint" pylint --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"
...
...
test/python/test.sh
View file @
f7f05f76
...
...
@@ -23,6 +23,7 @@ check "pylint" pylint --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"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment