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
dcfff151
Commit
dcfff151
authored
Mar 14, 2017
by
Kenneth Reitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanups
parent
9426dc86
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20103 additions
and
34 deletions
+20103
-34
pip-install
bin/steps/pip-install
+1
-1
pipenv
bin/steps/pipenv
+4
-2
pipenv-python-version
bin/steps/pipenv-python-version
+11
-12
python
bin/steps/python
+1
-1
Pipfile.lock
test/fixtures/pipenv-version/Pipfile.lock
+13
-14
run
test/run
+5
-4
get-pipenv.py
vendor/get-pipenv.py
+20068
-0
No files found.
bin/steps/pip-install
View file @
dcfff151
# Install dependencies with Pip.
# Install dependencies with Pip.
puts-
cmd "pip install -r requirements.txt
"
puts-
step "Installing dependencies with pip
"
set +e
set +e
# delete any existing egg links, to uninstall exisisting installations.
# delete any existing egg links, to uninstall exisisting installations.
...
...
bin/steps/pipenv
View file @
dcfff151
...
@@ -2,9 +2,11 @@
...
@@ -2,9 +2,11 @@
if [[ -f Pipfile ]]; then
if [[ -f Pipfile ]]; then
if [[ ! -f requirements.txt ]]; then
if [[ ! -f requirements.txt ]]; then
puts-step "Generating 'requirements.txt' with pipenv"
/app/.heroku/python/bin/pip install pipenv --upgrade &> /dev/null
puts-step "Installing pipenv"
/app/.heroku/python/bin/python $ROOT_DIR/vendor/get-pipenv.py &> /dev/null
puts-step "Generating 'requirements.txt' with pipenv"
/app/.heroku/python/bin/pipenv lock --requirements > requirements.txt 2> /dev/null
/app/.heroku/python/bin/pipenv lock --requirements > requirements.txt 2> /dev/null
pipstrip requirements.txt
pipstrip requirements.txt
...
...
bin/steps/pipenv-python-version
View file @
dcfff151
...
@@ -4,19 +4,18 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then
...
@@ -4,19 +4,18 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then
if [[ ! -f $BUILD_DIR/runtime.txt ]]; then
if [[ ! -f $BUILD_DIR/runtime.txt ]]; then
if [[ ! -f Pipfile.lock ]]; then
if [[ ! -f Pipfile.lock ]]; then
puts-step "Pipfile.lock not found, creating..."
puts-warn "Pipfile.lock not found!"
/app/.heroku/python/bin/pipenv lock 2> /dev/null
else
fi
set +e
PYTHON=$(cat $BUILD_DIR/Pipfile.lock | jq '._meta.requires.python_version' -r) 2>&1 /dev/null
set +e
set -e
PYTHON=$(cat $BUILD_DIR/Pipfile.lock | jq '._meta.requires.python_version' -r)
set -e
if [ "$PYTHON" = 2.7 ]; then
if [ "$PYTHON" = 2.7 ]; then
echo "python-2.7.13" > $BUILD_DIR/runtime.txt
echo "python-2.7.13" > $BUILD_DIR/runtime.txt
fi
fi
if [ "$PYTHON" = 3.6 ]; then
if [ "$PYTHON" = 3.6 ]; then
echo "python-3.6.0" > $BUILD_DIR/runtime.txt
echo "python-3.6.0" > $BUILD_DIR/runtime.txt
fi
fi
fi
fi
fi
fi
fi
...
...
bin/steps/python
View file @
dcfff151
...
@@ -51,7 +51,7 @@ if [ "$FRESH_PYTHON" ] || pip list -o --format=legacy --disable-pip-version-chec
...
@@ -51,7 +51,7 @@ if [ "$FRESH_PYTHON" ] || pip list -o --format=legacy --disable-pip-version-chec
TMPTARDIR=$(mktemp -d)
TMPTARDIR=$(mktemp -d)
trap "rm -rf $TMPTARDIR" RETURN
trap "rm -rf $TMPTARDIR" RETURN
puts-step "
Bootstrapp
ing pip"
puts-step "
Install
ing pip"
/app/.heroku/python/bin/python $ROOT_DIR/vendor/get-pip.py | indent
/app/.heroku/python/bin/python $ROOT_DIR/vendor/get-pip.py | indent
/app/.heroku/python/bin/pip install setuptools --upgrade &> /dev/null
/app/.heroku/python/bin/pip install setuptools --upgrade &> /dev/null
...
...
test/fixtures/pipenv-version/Pipfile.lock
View file @
dcfff151
{
{
"default": {
"requests": {
"version": "==2.13.0",
"hash": "sha256:1a720e8862a41aa22e339373b526f508ef0c8988baf48b84d3fc891a8e237efb"
}
},
"develop": {},
"_meta": {
"_meta": {
"hash": {
"sha256": "5866990104fc8f27d13cdf01abc2a32c553129e03f666316cacc5b42d3e0884e"
},
"requires": {
"python_version": "3.6"
},
"sources": [
"sources": [
{
{
"url": "https://pypi.python.org/simple",
"url": "https://pypi.python.org/simple",
"verify_ssl": true
"verify_ssl": true
}
}
],
]
"requires": {
},
"python_version": "3.6"
"default": {
},
"requests": {
"hash": {
"version": "==2.13.0"
"sha256": "5866990104fc8f27d13cdf01abc2a32c553129e03f666316cacc5b42d3e0884e"
}
}
}
},
"develop": {}
}
}
\ No newline at end of file
test/run
View file @
dcfff151
#!/usr/bin/env bash
#!/usr/bin/env bash
testPipenv
()
{
compile
"pipenv"
assertCapturedSuccess
}
testNoRequirements
()
{
testNoRequirements
()
{
...
@@ -16,6 +20,7 @@ testNLTK() {
...
@@ -16,6 +20,7 @@ testNLTK() {
}
}
testPipenvVersion
()
{
testPipenvVersion
()
{
compile
"pipenv-version"
compile
"pipenv-version"
assertCaptured
"3.6.0"
assertCaptured
"3.6.0"
...
@@ -27,10 +32,6 @@ testNewlineRuntime() {
...
@@ -27,10 +32,6 @@ testNewlineRuntime() {
assertCaptured
"2.7.11"
assertCaptured
"2.7.11"
}
}
testPipenv
()
{
compile
"pipenv"
assertCapturedSuccess
}
testSetupPy
()
{
testSetupPy
()
{
...
...
vendor/get-pipenv.py
0 → 100755
View file @
dcfff151
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