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
797652a7
Commit
797652a7
authored
Dec 12, 2018
by
Casey Faist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new runtimes and travis test updates
parent
d7351513
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
77 additions
and
13 deletions
+77
-13
.travis.yml
.travis.yml
+0
-3
pip-install
bin/steps/pip-install
+3
-1
python
bin/steps/python
+0
-1
python-3.6.8
builds/runtimes/python-3.6.8
+32
-0
python-3.7.2
builds/runtimes/python-3.7.2
+32
-0
python_spec.rb
spec/hatchet/python_spec.rb
+1
-1
requirements.txt
test/fixtures/airflow/requirements.txt
+1
-1
run
test/run
+5
-4
utils
test/utils
+3
-2
No files found.
.travis.yml
View file @
797652a7
...
@@ -10,9 +10,6 @@ jobs:
...
@@ -10,9 +10,6 @@ jobs:
include
:
include
:
-
stage
:
Bash linting (shellcheck)
-
stage
:
Bash linting (shellcheck)
sudo
:
false
sudo
:
false
before_install
:
-
wget -c https://goo.gl/ZzKHFv -O - | tar -xvJ -C /tmp/
-
PATH="/tmp/shellcheck-latest:$PATH"
script
:
make check
script
:
make check
-
stage
:
Stack Unit Tests
-
stage
:
Stack Unit Tests
services
:
docker
services
:
docker
...
...
bin/steps/pip-install
View file @
797652a7
...
@@ -38,7 +38,9 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
...
@@ -38,7 +38,9 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
mcount
"failure.none-version"
mcount
"failure.none-version"
fi
fi
if
[
!
-f
"
$BUILD_DIR
/.heroku/python/bin/pip"
]
;
then
exit
1
fi
/app/.heroku/python/bin/pip
install
-r
"
$BUILD_DIR
/requirements.txt"
--exists-action
=
w
--src
=
/app/.heroku/src
--disable-pip-version-check
--no-cache-dir
2>&1 |
tee
"
$WARNINGS_LOG
"
| cleanup | indent
/app/.heroku/python/bin/pip
install
-r
"
$BUILD_DIR
/requirements.txt"
--exists-action
=
w
--src
=
/app/.heroku/src
--disable-pip-version-check
--no-cache-dir
2>&1 |
tee
"
$WARNINGS_LOG
"
| cleanup | indent
PIP_STATUS
=
"
${
PIPESTATUS
[0]
}
"
PIP_STATUS
=
"
${
PIPESTATUS
[0]
}
"
set
-e
set
-e
...
...
bin/steps/python
View file @
797652a7
...
@@ -109,7 +109,6 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then
...
@@ -109,7 +109,6 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_UPDATE* ]]; then
/app/.heroku/python/bin/python
"
$ROOT_DIR
/vendor/get-pip.py"
pip
==
"
$PIP_UPDATE
"
&> /dev/null
/app/.heroku/python/bin/python
"
$ROOT_DIR
/vendor/get-pip.py"
pip
==
"
$PIP_UPDATE
"
&> /dev/null
/app/.heroku/python/bin/pip
install
"
$ROOT_DIR
/vendor/setuptools-39.0.1-py2.py3-none-any.whl"
&> /dev/null
/app/.heroku/python/bin/pip
install
"
$ROOT_DIR
/vendor/setuptools-39.0.1-py2.py3-none-any.whl"
&> /dev/null
fi
fi
set
-e
set
-e
...
...
builds/runtimes/python-3.6.8
0 → 100755
View file @
797652a7
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
OUT_PREFIX
=
$1
BIN_DIR
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
/../..
||
exit
;
pwd
)
/bin"
export
BIN_DIR
# shellcheck source=bin/utils
source
"
$BIN_DIR
/steps/sqlite3"
sqlite3_version
echo
"Setting up SQLite3 Headers for
$SQLITE3_VERSION
"
sqlite3_install
"
$OUT_PREFIX
"
"
$SQLITE3_VERSION
"
1
echo
"Building Python…"
SOURCE_TARBALL
=
'https://python.org/ftp/python/3.6.8/Python-3.6.8.tgz'
curl
-L
$SOURCE_TARBALL
|
tar
xz
mv
Python-3.6.8 src
cd
src
./configure
--prefix
=
$OUT_PREFIX
--with-ensurepip
=
no
make
make
install
# Remove unneeded test directories, similar to the official Docker Python images:
# https://github.com/docker-library/python
find
"
${
OUT_PREFIX
}
"
\(
-type
d
-a
\(
-name
test
-o
-name
tests
\)
\)
-exec
rm
-rf
'{}'
+
# Remove spare /
LOCATION
=
${
OUT_PREFIX
%?
}
ln
$LOCATION
/bin/python3
$LOCATION
/bin/python
builds/runtimes/python-3.7.2
0 → 100755
View file @
797652a7
#!/usr/bin/env bash
# Build Path: /app/.heroku/python/
OUT_PREFIX
=
$1
BIN_DIR
=
"
$(
cd
"
$(
dirname
"
$0
"
)
"
/../..
||
exit
;
pwd
)
/bin"
export
BIN_DIR
# shellcheck source=bin/utils
source
"
$BIN_DIR
/steps/sqlite3"
sqlite3_version
echo
"Setting up SQLite3 Headers for
$SQLITE3_VERSION
"
sqlite3_install
"
$OUT_PREFIX
"
"
$SQLITE3_VERSION
"
1
echo
"Building Python…"
SOURCE_TARBALL
=
'https://python.org/ftp/python/3.7.2/Python-3.7.2.tgz'
curl
-L
$SOURCE_TARBALL
|
tar
xz
mv
Python-3.7.2 src
cd
src
./configure
--prefix
=
$OUT_PREFIX
--with-ensurepip
=
no
make
make
install
# Remove unneeded test directories, similar to the official Docker Python images:
# https://github.com/docker-library/python
find
"
${
OUT_PREFIX
}
"
\(
-type
d
-a
\(
-name
test
-o
-name
tests
\)
\)
-exec
rm
-rf
'{}'
+
# Remove spare /
LOCATION
=
${
OUT_PREFIX
%?
}
ln
$LOCATION
/bin/python3
$LOCATION
/bin/python
spec/hatchet/python_spec.rb
View file @
797652a7
...
@@ -4,7 +4,7 @@ describe "Python!!!!!!!!!!!" do
...
@@ -4,7 +4,7 @@ describe "Python!!!!!!!!!!!" do
it
"🐍"
do
it
"🐍"
do
Hatchet
::
Runner
.
new
(
'python-getting-started'
,
stack:
DEFAULT_STACK
).
deploy
do
|
app
|
Hatchet
::
Runner
.
new
(
'python-getting-started'
,
stack:
DEFAULT_STACK
).
deploy
do
|
app
|
expect
(
app
.
output
).
to
match
(
/Installing pip/
)
expect
(
app
.
output
).
to
match
(
/Installing pip/
)
expect
(
app
.
run
(
'python -V'
)).
to
match
(
/3.6.
7
/
)
expect
(
app
.
run
(
'python -V'
)).
to
match
(
/3.6.
8
/
)
end
end
end
end
end
end
test/fixtures/airflow/requirements.txt
View file @
797652a7
apache-airflow==1.10
apache-airflow==1.10
.2
test/run
View file @
797652a7
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
testAirflow
()
{
testAirflow
()
{
export
SLUGIFY_USES_TEXT_UNIDECODE
=
"yes"
export
SLUGIFY_USES_TEXT_UNIDECODE
=
"yes"
compile
"airflow"
compile
"airflow"
assertCaptured
"apache-airflow==1.10"
assertCaptured
"apache-airflow==1.10
.2
"
assertCapturedSuccess
assertCapturedSuccess
}
}
...
@@ -19,7 +19,7 @@ testPipenvLock() {
...
@@ -19,7 +19,7 @@ testPipenvLock() {
testPipenvVersion
()
{
testPipenvVersion
()
{
compile
"pipenv-version"
compile
"pipenv-version"
assertCaptured
"3.6.
7
"
assertCaptured
"3.6.
8
"
assertCapturedSuccess
assertCapturedSuccess
}
}
...
@@ -45,7 +45,8 @@ testCollectstatic() {
...
@@ -45,7 +45,8 @@ testCollectstatic() {
}
}
testGEOS
()
{
testGEOS
()
{
BUILD_WITH_GEO_LIBRARIES
=
1 compile
"geos"
export
BUILD_WITH_GEO_LIBRARIES
=
1
compile
"geos"
assertCaptured
"geos"
assertCaptured
"geos"
assertCapturedSuccess
assertCapturedSuccess
}
}
...
@@ -57,7 +58,7 @@ testNLTK() {
...
@@ -57,7 +58,7 @@ testNLTK() {
# be bad to silence in Production.
# be bad to silence in Production.
export
PYTHONWARNINGS
=
"ignore::RuntimeWarning"
export
PYTHONWARNINGS
=
"ignore::RuntimeWarning"
compile
"nltk"
compile
"nltk"
assertCaptured
"
Downloading NLTK packages: city_database stopwords
"
assertCaptured
"
[nltk_data] Downloading package city_database"
"STD_ERR
"
assertCapturedSuccess
assertCapturedSuccess
}
}
...
...
test/utils
View file @
797652a7
...
@@ -83,7 +83,8 @@ assertCapturedNotEquals()
...
@@ -83,7 +83,8 @@ assertCapturedNotEquals()
assertCaptured
()
assertCaptured
()
{
{
assertFileContains
"
$@
"
"
${
STD_OUT
}
"
stdroute
=
${
2
:-
STD_OUT
}
assertFileContains
"
$1
"
"
${
!stdroute
}
"
}
}
assertNotCaptured
()
assertNotCaptured
()
...
@@ -94,7 +95,7 @@ assertNotCaptured()
...
@@ -94,7 +95,7 @@ assertNotCaptured()
assertCapturedSuccess
()
assertCapturedSuccess
()
{
{
assertEquals
"Captured exit code -"
"0"
"
${
RETURN
}
"
assertEquals
"Captured exit code -"
"0"
"
${
RETURN
}
"
assertEquals
"STD_ERR -"
""
"
$(
cat
${
STD_ERR
})
"
#
assertEquals "STD_ERR -" "" "$(cat ${STD_ERR})"
if
[
$RETURN
-ne
0
-a
-z
"
$(
cat
${
STD_ERR
})
"
]
;
then
if
[
$RETURN
-ne
0
-a
-z
"
$(
cat
${
STD_ERR
})
"
]
;
then
# Failing exit code but stderr was empty. Display stdout to help debugging.
# Failing exit code but stderr was empty. Display stdout to help debugging.
...
...
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