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
85f10b7d
Commit
85f10b7d
authored
Nov 02, 2016
by
Kenneth Reitz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ci'
parents
e36b5806
bbbadc83
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
+22
-3
compile
bin/compile
+9
-3
test-compile
bin/test-compile
+11
-0
utils
bin/utils
+2
-0
No files found.
bin/compile
View file @
85f10b7d
...
...
@@ -54,6 +54,11 @@ export PATH=$PATH:$ROOT_DIR/vendor/pip-pop
[
!
"
$SLUG_ID
"
]
&&
SLUG_ID
=
"defaultslug"
[
!
"
$REQUEST_ID
"
]
&&
REQUEST_ID
=
$SLUG_ID
[
!
"
$STACK
"
]
&&
STACK
=
$DEFAULT_PYTHON_STACK
[[
$BUILD_DIR
==
"/app"
]]
&&
SKIP_MOVE_BUILD
=
$1
echo
$SKIP_MOVE_BUILD
echo
$BUILD_DIR
echo
'^^^^'
# Sanitizing environment variables.
unset
GIT_DIR PYTHONHOME PYTHONPATH
...
...
@@ -78,7 +83,7 @@ APP_DIR='/app'
TMP_APP_DIR
=
$CACHE_DIR
/tmp_app_dir
# Skip these steps for Docker.
if
[[
!
"
$
DOCKER
_BUILD
"
]]
;
then
if
[[
!
"
$
SKIP_MOVE
_BUILD
"
]]
;
then
# Copy Anvil app dir to temporary storage...
bpwatch start anvil_appdir_stage
...
...
@@ -103,10 +108,11 @@ BUILD_DIR=$APP_DIR
# Set up outputs under new context
PROFILE_PATH
=
"
$BUILD_DIR
/.profile.d/python.sh"
EXPORT_PATH
=
"
$BIN_DIR
/../export"
GUNICORN_PROFILE_PATH
=
"
$BUILD_DIR
/.profile.d/python.gunicorn.sh"
# We'll need to send these statics to other scripts we `source`.
export
BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
export
BUILD_DIR CACHE_DIR BIN_DIR PROFILE_PATH
EXPORT_PATH
# Prepend proper environment variables for Python use.
export
PATH
=
$BUILD_DIR
/.heroku/python/bin:
$BUILD_DIR
/.heroku/vendor/bin:
$PATH
...
...
@@ -252,7 +258,7 @@ bpwatch start dump_cache
bpwatch stop dump_cache
# Fin.
if
[[
!
"
$
DOCKER
_BUILD
"
]]
;
then
if
[[
!
"
$
SKIP_MOVE
_BUILD
"
]]
;
then
bpwatch start appdir_commit
deep-rm
$ORIG_BUILD_DIR
...
...
bin/test-compile
0 → 100755
View file @
85f10b7d
#!/usr/bin/env bash
# Syntax sugar.
BIN_DIR
=
$(
cd
$(
dirname
$0
)
;
pwd
)
# absolute path
source
$BIN_DIR
/utils
DISABLE_COLLECTSTATIC
=
1
"
$(
dirname
${
0
:-})
/compile"
"
$1
"
"
$2
"
"
$3
"
if
[[
-f
"
$1
/requirements-test.txt"
]]
;
then
/app/.heroku/python/bin/pip
install
-r
requirements-test.txt
--exists-action
=
w
--src
=
./.heroku/src
--disable-pip-version-check
--no-cache-dir
2>&1 | cleanup | indent
fi
bin/utils
View file @
85f10b7d
...
...
@@ -39,11 +39,13 @@ puts-cmd() {
# Usage: $ set-env key value
set-env() {
echo "export $1=$2" >> $PROFILE_PATH
echo "export $1=$2" >> $EXPORT_PATH
}
# Usage: $ set-default-env key value
set-default-env() {
echo "export $1=\${$1:-$2}" >> $PROFILE_PATH
echo "export $1=\${$1:-$2}" >> $EXPORT_PATH
}
# Usage: $ un-set-env key
...
...
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