forked from cloudfoundry/python-buildpack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwarnings
More file actions
executable file
·47 lines (41 loc) · 1.76 KB
/
warnings
File metadata and controls
executable file
·47 lines (41 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
shopt -s extglob
old-platform() {
if grep -qi 'InsecurePlatformWarning' "$WARNINGS_LOG"; then
echo
puts-warn "Hello! It looks like your application is using an outdated version of Python."
puts-warn "This caused the security warning you saw above during the 'pip install' step."
puts-warn "We recommend '$RECOMMENDED_PYTHON_VERSION', which you can specify in a 'runtime.txt' file."
fi
}
pylibmc-missing() {
if grep -qi 'fatal error: libmemcached/memcached.h: No such file or directory' "$WARNINGS_LOG"; then
echo
puts-warn "Hello! There was a problem with your build related to libmemcache."
puts-warn "The Python library 'pylibmc' must be explicitly specified in 'requirements.txt' in order to build correctly."
puts-warn "Once you do that, everything should work as expected."
fi
}
scipy-included() {
if grep -qi 'running setup.py install for scipy' "$WARNINGS_LOG"; then
echo
puts-warn "Hello! It looks like you're trying to use scipy on Heroku."
puts-warn "Unfortunately, at this time, we do not directly support this library."
puts-warn "There is, however, a buildpack available that makes it possible to use it on Heroku."
puts-warn "You can learn more here: https://devcenter.heroku.com/articles/python-c-deps"
puts-warn "Sorry for the inconvenience."
fi
}
distribute-included() {
if grep -qi 'Running setup.py install for distribute' "$WARNINGS_LOG"; then
echo
puts-warn "Hello! Your requirements.txt file contains the distribute package."
puts-warn "This library is automatically installed by Heroku and shouldn't be in"
puts-warn "Your requirements.txt file. This can cause unexpected behavior."
fi
}
show-warnings() {
old-platform
pylibmc-missing
scipy-included
distribute-included
}