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
bdd466f8
Commit
bdd466f8
authored
Dec 20, 2016
by
Kenneth Reitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup pip install steps, caching src
parent
324ebc92
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
compile
bin/compile
+9
-1
pip-install
bin/steps/pip-install
+9
-0
No files found.
bin/compile
View file @
bdd466f8
...
...
@@ -148,11 +148,14 @@ bpwatch start restore_cache
cp
-R
$CACHE_DIR
/.heroku/python-version .heroku/ &> /dev/null
||
true
cp
-R
$CACHE_DIR
/.heroku/vendor .heroku/ &> /dev/null
||
true
cp
-R
$CACHE_DIR
/.heroku/venv .heroku/ &> /dev/null
||
true
if
[[
-d
$CACHE_DIR
/.heroku/src
]]
;
then
cp
-R
$CACHE_DIR
/.heroku/src .heroku/ &> /dev/null
||
true
fi
bpwatch stop restore_cache
mkdir
-p
$(
dirname
$PROFILE_PATH
)
mkdir
/app/.heroku/src
mkdir
-p
/app/.heroku/src
if
[[
$BUILD_DIR
!=
'/app'
]]
;
then
# python expects to reside in /app, so set up symlinks
...
...
@@ -160,6 +163,7 @@ if [[ $BUILD_DIR != '/app' ]]; then
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
# Note: .heroku/src is copied in later.
fi
# Install Python.
...
...
@@ -228,6 +232,7 @@ bpwatch start dump_cache
rm
-rf
$CACHE_DIR
/.heroku/python-stack
rm
-rf
$CACHE_DIR
/.heroku/vendor
rm
-rf
$CACHE_DIR
/.heroku/venv
rm
-rf
$CACHE_DIR
/.heroku/src
mkdir
-p
$CACHE_DIR
/.heroku
cp
-R
.heroku/python
$CACHE_DIR
/.heroku/
...
...
@@ -235,6 +240,9 @@ bpwatch start dump_cache
cp
-R
.heroku/python-stack
$CACHE_DIR
/.heroku/ &> /dev/null
||
true
cp
-R
.heroku/vendor
$CACHE_DIR
/.heroku/ &> /dev/null
||
true
cp
-R
.heroku/venv
$CACHE_DIR
/.heroku/ &> /dev/null
||
true
if
[[
-d
.heroku/src
]]
;
then
cp
-R
.heroku/src
$CACHE_DIR
/.heroku/ &> /dev/null
||
true
fi
bpwatch stop dump_cache
...
...
bin/steps/pip-install
View file @
bdd466f8
# Install dependencies with Pip.
puts-cmd "pip install -r requirements.txt"
# rewrite any existing egg links to point to the build dir so pip does not fail with a mismatch error
find .heroku/python/lib/python*/site-packages/ -name "*.egg-link" -print0 | xargs -r -0 -n 1 sed -i -e "s#/app/#$(pwd)/#"
find .heroku/python/lib/python*/site-packages/ -name "*.pth" -print0 | xargs -r -0 -n 1 sed -i -e "s#/app/#/$(pwd)/#"
[ ! "$FRESH_PYTHON" ] && bpwatch start pip_install
[ "$FRESH_PYTHON" ] && bpwatch start pip_install_first
...
...
@@ -23,4 +27,9 @@ cp requirements.txt .heroku/python/requirements-declared.txt
[ ! "$FRESH_PYTHON" ] && bpwatch stop pip_install
[ "$FRESH_PYTHON" ] && bpwatch stop pip_install_first
# rewrite build dir in egg links to /app so things are found at runtime
find .heroku/python/lib/python*/site-packages/ -name "*.egg-link" -print0 | xargs -r -0 -n 1 sed -i -e "s#$(pwd)/#/app/#"
find .heroku/python/lib/python*/site-packages/ -name "*.pth" -print0 | xargs -r -0 -n 1 sed -i -e "s#$(pwd)/#/app/#"
echo
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