File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -16,16 +16,19 @@ python_version=${BASE^} # this gives us only the filename with version number
16
16
version_number=$( echo " $python_version " | cut -d- -f2) # this returns just X.X.X
17
17
dep_url=https://python.org/ftp/python/${version_number} /${python_version} .tgz
18
18
19
- # shellcheck source=bin/utils
20
- source " $BIN_DIR /steps/sqlite3"
21
-
22
- sqlite3_version
23
- echo " Setting up SQLite3 Headers for $SQLITE3_VERSION "
24
- sqlite3_install " $OUT_PREFIX " " $SQLITE3_VERSION " 1
25
-
26
- echo " Building Python 3..."
27
- echo " Pulling from source: ${dep_url} "
28
-
19
+ # Install SQLITE, as headers are not available out of the box on the stack
20
+ apt-get install libsqlite3-dev
21
+ needed=( libsqlite3-dev )
22
+ if [[ $STACK != " heroku-16" && $STACK != " heroku-16" ]]; then
23
+ needed+=( realpath )
24
+
25
+ # Check whether our packages are missing on the stack
26
+ missing=$( comm -1 -3 <( dpkg-query -W -f ' ${package}\n' | sort) <( IFS=$' \n ' ; echo " ${needed[*]} " | sort) )
27
+ if [[ " $missing " ]]; then
28
+ # install missing and needed packages
29
+ apt-get update -qq || { echo " Failed to 'apt-get update'. You must build this formula using Docker." ; exit 1; }
30
+ apt-get install -q -y $missing
31
+ fi
29
32
30
33
curl -L " ${dep_url} " | tar xz -C " ${OUT_PREFIX} "
31
34
mv " ${OUT_PREFIX} /${python_version} " src
You can’t perform that action at this time.
0 commit comments