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
c19f0f83
Commit
c19f0f83
authored
Mar 16, 2017
by
Kenneth Reitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build
parent
8b88d655
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20122 additions
and
58 deletions
+20122
-58
compile
bin/compile
+0
-3
pip-install
bin/steps/pip-install
+13
-0
pipenv
bin/steps/pipenv
+0
-13
pipenv-python-version
bin/steps/pipenv-python-version
+12
-11
python
bin/steps/python
+24
-17
run
test/run
+12
-14
get-pip.py
vendor/get-pip.py
+20061
-0
No files found.
bin/compile
View file @
c19f0f83
...
...
@@ -158,9 +158,6 @@ source $BIN_DIR/steps/python
# Sanity check for setuptools/distribute.
source
$BIN_DIR
/steps/setuptools
# Pipenv support.
source
$BIN_DIR
/steps/pipenv
# If no requirements.txt file given, assume `setup.py develop` is intended.
if
[
!
-f
requirements.txt
]
;
then
echo
"-e ."
>
requirements.txt
...
...
bin/steps/pip-install
View file @
c19f0f83
...
...
@@ -13,6 +13,19 @@ find .heroku/python/lib-python/*/site-packages/ -name "*.egg-link" -print0 2> /d
find .heroku/python/lib-python/*/site-packages/ -name "*.pth" -print0 2> /dev/null | xargs -r -0 -n 1 sed -i -e "s#/app/#/$(pwd)/#" &> /dev/null
set -e
# Pipenv support (Generate requriements.txt with pipenv).
if [[ -f Pipfile ]]; then
if [[ ! -f requirements.txt ]]; then
puts-step "Generating 'requirements.txt' with pipenv"
/app/.heroku/python/bin/pip install pipenv --upgrade &> /dev/null
/app/.heroku/python/bin/pipenv lock --requirements --no-hashes > requirements.txt #2> /dev/null
cat requirements.txt
pipstrip requirements.txt
fi
fi
[ ! "$FRESH_PYTHON" ] && bpwatch start pip_install
[ "$FRESH_PYTHON" ] && bpwatch start pip_install_first
...
...
bin/steps/pipenv
deleted
100755 → 0
View file @
8b88d655
# Generate requriements.txt with pipenv.
if [[ -f Pipfile ]]; then
if [[ ! -f requirements.txt ]]; then
puts-step "Generating 'requirements.txt' with pipenv"
pip install pipenv --upgrade &> /dev/null
pipenv lock --requirements > requirements.txt 2> /dev/null
pipstrip requirements.txt
fi
fi
bin/steps/pipenv-python-version
View file @
c19f0f83
...
...
@@ -3,10 +3,10 @@
if [[ -f $BUILD_DIR/Pipfile.lock ]]; then
if [[ ! -f $BUILD_DIR/runtime.txt ]]; then
if [[ ! -f Pipfile.lock ]]; then
p
ipenv lock 2> /dev/null
if [[ ! -f
$BUILD_DIR/
Pipfile.lock ]]; then
p
uts-warn "No 'pipfile.lock' found! We recommend you commit this into your repository."
fi
if [[ -f $BUILD_DIR/Pipfile.lock ]]; then
set +e
PYTHON=$(cat $BUILD_DIR/Pipfile.lock | jq '._meta.requires.python_version' -r)
set -e
...
...
@@ -18,5 +18,6 @@ if [[ -f $BUILD_DIR/Pipfile.lock ]]; then
echo "python-3.6.0" > $BUILD_DIR/runtime.txt
fi
fi
fi
fi
bin/steps/python
View file @
c19f0f83
...
...
@@ -55,23 +55,30 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_VERSION* ]]; then
TMPTARDIR=$(mktemp -d)
trap "rm -rf $TMPTARDIR" RETURN
bpwatch start install_setuptools
# Prepare it for the real world
puts-step "Installing pip"
/app/.heroku/python/bin/python $ROOT_DIR/vendor/get-pip.py &> /dev/null
# bpwatch start install_setuptools
# # Prepare it for the real world
# puts-step "Installing Setuptools ($SETUPTOOLS_VERSION)"
tar zxf $ROOT_DIR/vendor/setuptools-$SETUPTOOLS_VERSION.tar.gz -C $TMPTARDIR
cd $TMPTARDIR/setuptools-$SETUPTOOLS_VERSION/
python setup.py install
&> /dev/null
cd $WORKING_DIR
bpwatch stop install_setuptoools
#
tar zxf $ROOT_DIR/vendor/setuptools-$SETUPTOOLS_VERSION.tar.gz -C $TMPTARDIR
#
cd $TMPTARDIR/setuptools-$SETUPTOOLS_VERSION/
# /app/.heroku/python/bin/python setup.py install
&> /dev/null
#
cd $WORKING_DIR
#
bpwatch stop install_setuptoools
bpwatch start install_pip
#
bpwatch start install_pip
# puts-step "Installing Pip ($PIP_VERSION)"
tar zxf $ROOT_DIR/vendor/pip-$PIP_VERSION.tar.gz -C $TMPTARDIR
cd $TMPTARDIR/pip-$PIP_VERSION/
python setup.py install &> /dev/null
cd $WORKING_DIR
# tar zxf $ROOT_DIR/vendor/pip-$PIP_VERSION.tar.gz -C $TMPTARDIR
# cd $TMPTARDIR/pip-$PIP_VERSION/
# /app/.heroku/python/bin/python setup.py install &> /dev/null
# cd $WORKING_DIR
# bpwatch stop install_pip
bpwatch stop install_pip
bpwatch stop prepare_environment
fi
...
...
test/run
View file @
c19f0f83
#!/usr/bin/env bash
testPipenvVersion
()
{
compile
"pipenv-version"
assertCaptured
"3.6.0"
assertCapturedSuccess
}
testPipenv
()
{
compile
"pipenv"
assertCapturedSuccess
}
testNoRequirements
()
{
...
...
@@ -12,20 +24,6 @@ testNLTK() {
compile
"nltk"
assertCaptured
"wordnet"
assertCapturedSuccess
}
testPipenvVersion
()
{
compile
"pipenv-version"
assertCaptured
"3.6.0"
assertCapturedSuccess
}
testPipenv
()
{
compile
"pipenv"
assertCapturedSuccess
}
...
...
vendor/get-pip.py
0 → 100644
View file @
c19f0f83
This diff is collapsed.
Click to expand it.
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