mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-05 23:10:16 +00:00
improvements
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Install dependencies with Pip.
|
||||
puts-cmd "pip install -r requirements.txt"
|
||||
puts-step "Installing requirements with pip"
|
||||
|
||||
set +e
|
||||
# delete any existing egg links, to uninstall exisisting installations.
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ if [[ -f Pipfile ]]; then
|
||||
if [[ ! -f requirements.txt ]]; then
|
||||
puts-step "Generating 'requirements.txt' with pipenv"
|
||||
|
||||
pip install git+https://github.com/kennethreitz/pipenv.git#egg=pipenv &> /dev/null
|
||||
pip install pipenv --upgrade &> /dev/null
|
||||
pipenv lock --requirements > requirements.txt 2> /dev/null
|
||||
|
||||
pipstrip requirements.txt
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
set +e
|
||||
runtime-fixer runtime.txt
|
||||
PYTHON_VERSION=$(cat runtime.txt)
|
||||
|
||||
# Install Python.
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
wordnet
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
nltk
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
[[source]]
|
||||
url = "https://pypi.python.org/simple"
|
||||
verify_ssl = true
|
||||
|
||||
[packages]
|
||||
requests = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.6"
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"default": {
|
||||
"requests": {
|
||||
"version": "==2.13.0",
|
||||
"hash": "sha256:1a720e8862a41aa22e339373b526f508ef0c8988baf48b84d3fc891a8e237efb"
|
||||
}
|
||||
},
|
||||
"develop": {},
|
||||
"_meta": {
|
||||
"sources": [
|
||||
{
|
||||
"url": "https://pypi.python.org/simple",
|
||||
"verify_ssl": true
|
||||
}
|
||||
],
|
||||
"requires": {
|
||||
"python_version": "3.6"
|
||||
},
|
||||
"hash": {
|
||||
"sha256": "5866990104fc8f27d13cdf01abc2a32c553129e03f666316cacc5b42d3e0884e"
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
[packages]
|
||||
"delegator.py" = "*"
|
||||
@@ -1,11 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
|
||||
testNoRequirements() {
|
||||
compile "no-requirements"
|
||||
assertCapturedError
|
||||
}
|
||||
|
||||
|
||||
testNLTK() {
|
||||
compile "nltk"
|
||||
assertCaptured "wordnet"
|
||||
assertCapturedSuccess
|
||||
|
||||
}
|
||||
|
||||
|
||||
testPipenvVersion() {
|
||||
compile "pipenv-version"
|
||||
assertCaptured "3.6.0"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
|
||||
testPipenv() {
|
||||
compile "pipenv"
|
||||
assertCapturedSuccess
|
||||
}
|
||||
|
||||
|
||||
testSetupPy() {
|
||||
compile "setup-py"
|
||||
assertCaptured "maya"
|
||||
|
||||
@@ -150,6 +150,8 @@ _assertContains()
|
||||
debug()
|
||||
{
|
||||
cat $STD_OUT
|
||||
echo '^^^^^^'
|
||||
cat $STD_ERR
|
||||
}
|
||||
|
||||
assertContains()
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
|
||||
runtime_file = sys.argv[1]
|
||||
|
||||
with open(req_file, 'r') as f:
|
||||
r = f.read().strip()
|
||||
|
||||
with open(runtime_file, 'w') as f:
|
||||
f.write(r)
|
||||
Reference in New Issue
Block a user