Skip to content

Commit e598611

Browse files
Merge pull request devcontainers#178 from devcontainers/samruddhikhandale/update-universal
universal - fix oryx bug for Python projects
2 parents b33475d + 915ce9b commit e598611

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

src/universal/.devcontainer/local-features/setup-user/install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ DEBIAN_FLAVOR="focal-scm"
2525
mkdir -p /opt/oryx && echo "vso-focal" > /opt/oryx/.imagetype
2626
echo "DEBIAN|${DEBIAN_FLAVOR}" | tr '[a-z]' '[A-Z]' > /opt/oryx/.ostype
2727

28+
# Oryx expects the tool to be installed at `/opt/oryx` and looks for relevant files in there.
29+
ln -snf /usr/local/oryx/* /opt/oryx
30+
2831
# For the universal image, oryx build tool installs the detected platforms in /home/codespace/*. Hence, linking current platforms to the /home/codespace/ path and adding it to the PATH.
2932
# This ensures that whatever platfornm versions oryx detects and installs are set as root.
3033
NODE_PATH="/home/codespace/.nodejs/current"
@@ -38,6 +41,7 @@ ln -snf /usr/local/php/current $PHP_PATH
3841
PYTHON_PATH="/home/codespace/.python/current"
3942
mkdir -p /home/codespace/.python
4043
ln -snf /usr/local/python/current $PYTHON_PATH
44+
ln -snf /usr/local/python /opt/python
4145

4246
JAVA_PATH="/home/codespace/.java/current"
4347
mkdir -p /home/codespace/.java

src/universal/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "2.0.21",
2+
"version": "2.0.22",
33
"build": {
44
"latest": true,
55
"rootDistro": "debian",

src/universal/test-project/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ check "pydocstyle" pydocstyle --version
3737
check "bandit" bandit --version
3838
check "virtualenv" virtualenv --version
3939
count=$(ls /usr/local/python | wc -l)
40-
expectedCount=3 # 2 version folders + 1 current folder which links to either one of the version
40+
expectedCount=4 # 2 version folders + 1 current folder which links to either one of the version + 1 folder generated by oryx build command
4141
checkVersionCount "two versions of python are present" $count $expectedCount
4242
echo $(echo "python versions" && ls -a /usr/local/python)
4343
echo $(echo "pip list" pip list)

0 commit comments

Comments
 (0)