-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #639 from mendix/develop
Release 2023-06-06
- Loading branch information
Showing
19 changed files
with
154 additions
and
72 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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,51 @@ | ||
#!/bin/bash | ||
set -e | ||
shopt -s expand_aliases | ||
|
||
# This file is a copy of https://github.com/cloudfoundry/php-buildpack/commit/5074091c420bcb569b98cf5af151b6e35d79d59f | ||
# please refer to that location for future changes. | ||
|
||
function main() { | ||
install_dir="$1" | ||
buildpack_dir="$2" | ||
|
||
if [ ! -d "/tmp/python/bin" ]; then | ||
python_dep_name=$(get_python_from_manifest "$buildpack_dir") | ||
echo " -------> Providing Python $(echo $python_dep_name | cut -d'_' -f 2) (required by the buildpack to run in cflinuxfs4)" | ||
|
||
if [ ! -d "$buildpack_dir/dependencies" ]; then | ||
setup_online "$python_dep_name" "$install_dir" "$buildpack_dir" | ||
else | ||
setup_offline "$python_dep_name" "$install_dir" "$buildpack_dir" | ||
fi | ||
elif [ $install_dir != "/tmp/python" ]; then | ||
cp -r "/tmp/python/." "$install_dir" | ||
fi | ||
|
||
export LD_LIBRARY_PATH="$install_dir/lib:${LD_LIBRARY_PATH:-}" | ||
export PATH="$install_dir/bin:${PATH:-}" | ||
} | ||
|
||
function setup_offline() { | ||
python_dep_name="$1" | ||
install_dir="$2" | ||
buildpack_dir="$3" | ||
|
||
tar -xzf "$buildpack_dir/dependencies/https___buildpacks.cloudfoundry.org_dependencies_python_$python_dep_name" -C "$install_dir" | ||
} | ||
|
||
function setup_online(){ | ||
python_dep_name="$1" | ||
install_dir="$2" | ||
buildpack_dir="$3" | ||
|
||
curl -Ls "https://buildpacks.cloudfoundry.org/dependencies/python/$python_dep_name" | tar -xzf - -C "$install_dir" | ||
} | ||
|
||
function get_python_from_manifest() { | ||
buildpack_dir="$1" | ||
python_dep_info=$(cat "$buildpack_dir/dependencies-stage.yml" | grep -A 3 "name: python" | grep "uri:" | awk '{print $2}' | cut -d'/' -f 6) | ||
echo "$python_dep_info" | ||
} | ||
|
||
main "${@:-}" |
This file contains 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 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 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 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,8 @@ | ||
--- | ||
- name: python | ||
version: 3.10.6 | ||
uri: https://buildpacks.cloudfoundry.org/dependencies/python/python_3.10.6_linux_x64_cflinuxfs4_62e69f06.tgz | ||
sha256: 62e69f0664e0bbb05a6351d4d96dc9ea6b959c4c2e4ccdb124f932d0bdac0e41 | ||
cf_stacks: | ||
- cflinuxfs4 | ||
source_sha256: 848cb06a5caa85da5c45bd7a9221bb821e33fc2bdcba088c127c58fad44e6343 |
This file contains 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 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM python:3.6 | ||
FROM --platform=linux/amd64 python:3.10 | ||
|
||
WORKDIR /app | ||
|
||
|
This file contains 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 |
---|---|---|
|
@@ -22,4 +22,4 @@ function add_metadata(tag, timestamp, record) | |
end | ||
|
||
return 2, timestamp, record | ||
end | ||
end |
Oops, something went wrong.