Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-python
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-python
Commits
1b7bd02b
Commit
1b7bd02b
authored
Dec 17, 2016
by
Kenneth Reitz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into docker-builds
parents
076a457a
de9b0b93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
56 deletions
+21
-56
CHANGELOG.md
CHANGELOG.md
+4
-0
compile
bin/compile
+17
-56
No files found.
CHANGELOG.md
View file @
1b7bd02b
# Python Buildpack Changelog
# Python Buildpack Changelog
## v86
Refactor and multi-buildpack compatibility.
## v85
## v85
Packaging fix.
Packaging fix.
...
...
bin/compile
View file @
1b7bd02b
...
@@ -54,7 +54,6 @@ export PATH=$PATH:$ROOT_DIR/vendor/pip-pop
...
@@ -54,7 +54,6 @@ export PATH=$PATH:$ROOT_DIR/vendor/pip-pop
[
!
"
$SLUG_ID
"
]
&&
SLUG_ID
=
"defaultslug"
[
!
"
$SLUG_ID
"
]
&&
SLUG_ID
=
"defaultslug"
[
!
"
$REQUEST_ID
"
]
&&
REQUEST_ID
=
$SLUG_ID
[
!
"
$REQUEST_ID
"
]
&&
REQUEST_ID
=
$SLUG_ID
[
!
"
$STACK
"
]
&&
STACK
=
$DEFAULT_PYTHON_STACK
[
!
"
$STACK
"
]
&&
STACK
=
$DEFAULT_PYTHON_STACK
[[
$BUILD_DIR
==
"/app"
]]
&&
SKIP_MOVE_BUILD
=
1
# Sanitizing environment variables.
# Sanitizing environment variables.
unset
GIT_DIR PYTHONHOME PYTHONPATH
unset
GIT_DIR PYTHONHOME PYTHONPATH
...
@@ -64,7 +63,6 @@ unset CYTOKINE_LOG_FILE GEM_PATH
...
@@ -64,7 +63,6 @@ unset CYTOKINE_LOG_FILE GEM_PATH
# Setup buildpack instrumentation.
# Setup buildpack instrumentation.
bpwatch init
$LOGPLEX_KEY
bpwatch init
$LOGPLEX_KEY
bpwatch build python
$BUILDPACK_VERSION
$REQUEST_ID
bpwatch build python
$BUILDPACK_VERSION
$REQUEST_ID
TMP_APP_DIR
=
$CACHE_DIR
/tmp_app_dir
bpwatch start compile
bpwatch start compile
...
@@ -74,33 +72,8 @@ source $BIN_DIR/utils
...
@@ -74,33 +72,8 @@ source $BIN_DIR/utils
# Import collection of warnings.
# Import collection of warnings.
source
$BIN_DIR
/warnings
source
$BIN_DIR
/warnings
# Directory Hacks for path consistency.
# we need to put a bunch of symlinks in there later
APP_DIR
=
'/app'
mkdir
-p
/app/.heroku
TMP_APP_DIR
=
$CACHE_DIR
/tmp_app_dir
# Skip these steps for Docker.
if
[[
!
"
$SKIP_MOVE_BUILD
"
]]
;
then
# Copy Anvil app dir to temporary storage...
bpwatch start anvil_appdir_stage
if
[
"
$SLUG_ID
"
]
;
then
mkdir
-p
$TMP_APP_DIR
deep-mv
$APP_DIR
$TMP_APP_DIR
else
deep-rm
$APP_DIR
fi
bpwatch stop anvil_appdir_stage
# Copy Application code in.
bpwatch start appdir_stage
deep-cp
$BUILD_DIR
$APP_DIR
bpwatch stop appdir_stage
fi
# Set new context.
ORIG_BUILD_DIR
=
$BUILD_DIR
BUILD_DIR
=
$APP_DIR
# Set up outputs under new context
# Set up outputs under new context
PROFILE_PATH
=
"
$BUILD_DIR
/.profile.d/python.sh"
PROFILE_PATH
=
"
$BUILD_DIR
/.profile.d/python.sh"
...
@@ -111,14 +84,14 @@ GUNICORN_PROFILE_PATH="$BUILD_DIR/.profile.d/python.gunicorn.sh"
...
@@ -111,14 +84,14 @@ GUNICORN_PROFILE_PATH="$BUILD_DIR/.profile.d/python.gunicorn.sh"
export
BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH EXPORT_PATH
export
BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH EXPORT_PATH
# Prepend proper environment variables for Python use.
# Prepend proper environment variables for Python use.
export
PATH
=
$BUILD_DIR
/.heroku/python/bin:
$BUILD_DIR
/.heroku/vendor/bin:
$PATH
export
PATH
=
/app/.heroku/python/bin:/app
/.heroku/vendor/bin:
$PATH
export
PYTHONUNBUFFERED
=
1
export
PYTHONUNBUFFERED
=
1
export
LANG
=
en_US.UTF-8
export
LANG
=
en_US.UTF-8
export
C_INCLUDE_PATH
=
/app/.heroku/vendor/include:
$BUILD_DIR
/.heroku/vendor/include:
/app/.heroku/python/include:
$C_INCLUDE_PATH
export
C_INCLUDE_PATH
=
/app/.heroku/vendor/include:/app/.heroku/python/include:
$C_INCLUDE_PATH
export
CPLUS_INCLUDE_PATH
=
/app/.heroku/vendor/include:
$BUILD_DIR
/.heroku/vendor/include:
/app/.heroku/python/include:
$CPLUS_INCLUDE_PATH
export
CPLUS_INCLUDE_PATH
=
/app/.heroku/vendor/include:/app/.heroku/python/include:
$CPLUS_INCLUDE_PATH
export
LIBRARY_PATH
=
/app/.heroku/vendor/lib:
$BUILD_DIR
/.heroku/vendor/lib:
/app/.heroku/python/lib:
$LIBRARY_PATH
export
LIBRARY_PATH
=
/app/.heroku/vendor/lib:/app/.heroku/python/lib:
$LIBRARY_PATH
export
LD_LIBRARY_PATH
=
/app/.heroku/vendor/lib:
$BUILD_DIR
/.heroku/vendor/lib:
/app/.heroku/python/lib:
$LD_LIBRARY_PATH
export
LD_LIBRARY_PATH
=
/app/.heroku/vendor/lib:/app/.heroku/python/lib:
$LD_LIBRARY_PATH
export
PKG_CONFIG_PATH
=
/app/.heroku/vendor/lib/pkg-config:
$BUILD_DIR
/.heroku/vendor/lib/pkg-config:
/app/.heroku/python/lib/pkg-config:
$PKG_CONFIG_PATH
export
PKG_CONFIG_PATH
=
/app/.heroku/vendor/lib/pkg-config:/app/.heroku/python/lib/pkg-config:
$PKG_CONFIG_PATH
# Switch to the repo's context.
# Switch to the repo's context.
cd
$BUILD_DIR
cd
$BUILD_DIR
...
@@ -178,13 +151,16 @@ bpwatch start restore_cache
...
@@ -178,13 +151,16 @@ bpwatch start restore_cache
bpwatch stop restore_cache
bpwatch stop restore_cache
set
+e
# Create set-aside `.heroku` folder.
mkdir
.heroku &> /dev/null
set
-e
mkdir
-p
$(
dirname
$PROFILE_PATH
)
mkdir
-p
$(
dirname
$PROFILE_PATH
)
if
[[
$BUILD_DIR
!=
'/app'
]]
;
then
# python expects to reside in /app, so set up symlinks
# we will not remove these later so subsequent buildpacks can still invoke it
ln
-s
$BUILD_DIR
/.heroku/python /app/.heroku/python
ln
-s
$BUILD_DIR
/.heroku/vendor /app/.heroku/vendor
ln
-s
$BUILD_DIR
/.heroku/venv /app/.heroku/venv
fi
# Install Python.
# Install Python.
source
$BIN_DIR
/steps/python
source
$BIN_DIR
/steps/python
...
@@ -254,19 +230,4 @@ bpwatch start dump_cache
...
@@ -254,19 +230,4 @@ bpwatch start dump_cache
bpwatch stop dump_cache
bpwatch stop dump_cache
# Fin.
# Fin.
if
[[
!
"
$SKIP_MOVE_BUILD
"
]]
;
then
bpwatch stop compile
bpwatch start appdir_commit
deep-rm
$ORIG_BUILD_DIR
deep-mv
$BUILD_DIR
$ORIG_BUILD_DIR
bpwatch stop appdir_commit
bpwatch start anvil_appdir_commit
if
[
"
$SLUG_ID
"
]
;
then
deep-mv
$TMP_APP_DIR
$APP_DIR
fi
bpwatch stop anvil_appdir_commit
bpwatch stop compile
fi
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