Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
heroku-buildpack-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Evili del Rio i Silvan
heroku-buildpack-python
Commits
85f10b7d
Commit
85f10b7d
authored
8 years ago
by
Kenneth Reitz
Browse files
Options
Downloads
Plain Diff
Merge branch 'ci'
parents
e36b5806
bbbadc83
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
bin/compile
+9
-3
9 additions, 3 deletions
bin/compile
bin/test-compile
+11
-0
11 additions, 0 deletions
bin/test-compile
bin/utils
+2
-0
2 additions, 0 deletions
bin/utils
with
22 additions
and
3 deletions
bin/compile
+
9
−
3
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
...
...
This diff is collapsed.
Click to expand it.
bin/test-compile
0 → 100755
+
11
−
0
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
This diff is collapsed.
Click to expand it.
bin/utils
+
2
−
0
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment