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
41e0f642
Unverified
Commit
41e0f642
authored
Nov 15, 2018
by
Casey
Committed by
GitHub
Nov 15, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #782 from heroku/next-release
Test updates
parents
62eaae35
b3988a56
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
117 additions
and
44 deletions
+117
-44
compile
bin/compile
+3
-3
pipenv-python-version
bin/steps/pipenv-python-version
+1
-2
python_spec.rb
spec/hatchet/python_spec.rb
+1
-1
Pipfile
test/fixtures/pipenv-version/Pipfile
+1
-1
Pipfile
test/fixtures/pipenv-version2/Pipfile
+11
-0
Pipfile.lock
test/fixtures/pipenv-version2/Pipfile.lock
+20
-0
requirements.txt
test/fixtures/python2_fail/requirements.txt
+1
-0
runtime.txt
test/fixtures/python2_fail/runtime.txt
+1
-0
requirements.txt
test/fixtures/python3_4_fail/requirements.txt
+0
-0
runtime.txt
test/fixtures/python3_4_fail/runtime.txt
+1
-0
requirements.txt
test/fixtures/python3_5_fail/requirements.txt
+0
-0
runtime.txt
test/fixtures/python3_5_fail/runtime.txt
+1
-0
runtime.txt
test/fixtures/python3_6/runtime.txt
+1
-1
runtime.txt
test/fixtures/python3_6_7/runtime.txt
+0
-1
requirements.txt
test/fixtures/python3_6_fail/requirements.txt
+1
-0
runtime.txt
test/fixtures/python3_6_fail/runtime.txt
+1
-0
runtime.txt
test/fixtures/python3_7/runtime.txt
+1
-1
runtime.txt
test/fixtures/python3_7_1/runtime.txt
+0
-1
requirements.txt
test/fixtures/python3_7_fail/requirements.txt
+1
-0
runtime.txt
test/fixtures/python3_7_fail/runtime.txt
+1
-0
requirements.txt
test/fixtures/python3_7_warn/requirements.txt
+1
-0
runtime.txt
test/fixtures/python3_7_warn/runtime.txt
+1
-0
requirements.txt
test/fixtures/pythonDefault/requirements.txt
+1
-0
run
test/run
+67
-33
No files found.
bin/compile
View file @
41e0f642
...
@@ -49,9 +49,9 @@ export VENDOR_URL
...
@@ -49,9 +49,9 @@ export VENDOR_URL
# These variables are used to specify which versions of Python to install by default,
# These variables are used to specify which versions of Python to install by default,
# as well as prompt the user to upgrade if they are using an un–supported version.
# as well as prompt the user to upgrade if they are using an un–supported version.
# Note: When 3.7 lands, I recommend switching to LATEST_36 and LATEST_37.
# Note: When 3.7 lands, I recommend switching to LATEST_36 and LATEST_37.
DEFAULT_PYTHON_VERSION
=
"python-3.6.
6
"
DEFAULT_PYTHON_VERSION
=
"python-3.6.
7
"
LATEST_36
=
"python-3.6.
6
"
LATEST_36
=
"python-3.6.
7
"
LATEST_37
=
"python-3.7.
0
"
LATEST_37
=
"python-3.7.
1
"
LATEST_35
=
"python-3.5.6"
LATEST_35
=
"python-3.5.6"
LATEST_34
=
"python-3.4.9"
LATEST_34
=
"python-3.4.9"
LATEST_27
=
"python-2.7.15"
LATEST_27
=
"python-2.7.15"
...
...
bin/steps/pipenv-python-version
View file @
41e0f642
...
@@ -19,7 +19,7 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then
...
@@ -19,7 +19,7 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then
if
[[
"
$PYTHON
"
==
"null"
]]
;
then
if
[[
"
$PYTHON
"
==
"null"
]]
;
then
PYTHON
=
$(
jq
-r
'._meta.requires.python_version'
"
$BUILD_DIR
/Pipfile.lock"
)
PYTHON
=
$(
jq
-r
'._meta.requires.python_version'
"
$BUILD_DIR
/Pipfile.lock"
)
if
[
"
$PYTHON
"
=
2.7
]
;
then
if
[
"
$PYTHON
"
=
2.7
]
;
then
echo
"
$LATEST_2
"
>
"
$BUILD_DIR
/runtime.txt"
echo
"
$LATEST_2
7
"
>
"
$BUILD_DIR
/runtime.txt"
fi
fi
if
[
"
$PYTHON
"
=
3.6
]
;
then
if
[
"
$PYTHON
"
=
3.6
]
;
then
echo
"
$LATEST_36
"
>
"
$BUILD_DIR
/runtime.txt"
echo
"
$LATEST_36
"
>
"
$BUILD_DIR
/runtime.txt"
...
@@ -33,4 +33,3 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then
...
@@ -33,4 +33,3 @@ if [[ -f $BUILD_DIR/Pipfile ]]; then
fi
fi
fi
fi
fi
fi
spec/hatchet/python_spec.rb
View file @
41e0f642
...
@@ -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.
6
/
)
expect
(
app
.
run
(
'python -V'
)).
to
match
(
/3.6.
7
/
)
end
end
end
end
end
end
test/fixtures/pipenv-version/Pipfile
View file @
41e0f642
test/fixtures/pipenv-version2/Pipfile
0 → 100644
View file @
41e0f642
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
[dev-packages]
[requires]
python_version = "2.7"
test/fixtures/pipenv-version2/Pipfile.lock
0 → 100644
View file @
41e0f642
{
"_meta": {
"hash": {
"sha256": "ae4bdd7d4157baab65ae9d0e8389a6011e6b640995372c45ec81fa5d1ddfae9f"
},
"pipfile-spec": 6,
"requires": {
"python_version": "2.7"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {},
"develop": {}
}
test/fixtures/python2_fail/requirements.txt
0 → 100644
View file @
41e0f642
requests
\ No newline at end of file
test/fixtures/python2_fail/runtime.txt
0 → 100644
View file @
41e0f642
python-2.7.16
test/fixtures/python3_
6_7
/requirements.txt
→
test/fixtures/python3_
4_fail
/requirements.txt
View file @
41e0f642
File moved
test/fixtures/python3_4_fail/runtime.txt
0 → 100644
View file @
41e0f642
python-3.4.10
test/fixtures/python3_
7_1
/requirements.txt
→
test/fixtures/python3_
5_fail
/requirements.txt
View file @
41e0f642
File moved
test/fixtures/python3_5_fail/runtime.txt
0 → 100644
View file @
41e0f642
python-3.5.7
test/fixtures/python3_6/runtime.txt
View file @
41e0f642
python-3.6.
6
python-3.6.
7
test/fixtures/python3_6_7/runtime.txt
deleted
100644 → 0
View file @
62eaae35
python-3.6.7
test/fixtures/python3_6_fail/requirements.txt
0 → 100644
View file @
41e0f642
flask
test/fixtures/python3_6_fail/runtime.txt
0 → 100644
View file @
41e0f642
python-3.6.8
test/fixtures/python3_7/runtime.txt
View file @
41e0f642
python-3.7.
0
python-3.7.
1
test/fixtures/python3_7_1/runtime.txt
deleted
100644 → 0
View file @
62eaae35
python-3.7.1
test/fixtures/python3_7_fail/requirements.txt
0 → 100644
View file @
41e0f642
flask
test/fixtures/python3_7_fail/runtime.txt
0 → 100644
View file @
41e0f642
python-3.7.2
test/fixtures/python3_7_warn/requirements.txt
0 → 100644
View file @
41e0f642
requests
\ No newline at end of file
test/fixtures/python3_7_warn/runtime.txt
0 → 100644
View file @
41e0f642
python-3.7.0
test/fixtures/pythonDefault/requirements.txt
0 → 100644
View file @
41e0f642
flask
test/run
View file @
41e0f642
...
@@ -19,10 +19,15 @@ testPipenvLock() {
...
@@ -19,10 +19,15 @@ testPipenvLock() {
testPipenvVersion
()
{
testPipenvVersion
()
{
compile
"pipenv-version"
compile
"pipenv-version"
assertCaptured
"3.6.
6
"
assertCaptured
"3.6.
7
"
assertCapturedSuccess
assertCapturedSuccess
}
}
testPipenvVersion2
()
{
compile
"pipenv-version2"
assertCaptured
"2.7.15"
assertCapturedSuccess
}
testPipenvFullVersion
()
{
testPipenvFullVersion
()
{
compile
"pipenv-full-version"
compile
"pipenv-full-version"
assertCaptured
"3.6.3"
assertCaptured
"3.6.3"
...
@@ -87,6 +92,18 @@ testPylibmc() {
...
@@ -87,6 +92,18 @@ testPylibmc() {
assertCapturedSuccess
assertCapturedSuccess
}
}
testPythonDefault
()
{
compile
"pythonDefault"
assertCaptured
"python-3.6.7"
assertCapturedSuccess
}
testPython2
()
{
compile
"python2"
assertCaptured
"python-2.7.15"
assertCapturedSuccess
}
testPython2_warn
()
{
testPython2_warn
()
{
compile
"python2_warn"
compile
"python2_warn"
if
[[
$STACK
=
"heroku-18"
]]
;
then
if
[[
$STACK
=
"heroku-18"
]]
;
then
...
@@ -98,31 +115,41 @@ testPython2_warn() {
...
@@ -98,31 +115,41 @@ testPython2_warn() {
fi
fi
}
}
testPython2
()
{
testPython2_fail
()
{
compile
"python2"
compile
"python2_fail"
assertCaptured
"python-2.7.15"
assertCaptured
"Aborting"
assertCapturedError
}
testPython3_4
()
{
compile
"python3_4"
assertCaptured
"python-3.4.9"
assertCapturedSuccess
assertCapturedSuccess
}
}
# This fail
testPython3_4_warn
()
{
testPython3_4_warn
()
{
compile
"python3_4_warn"
compile
"python3_4_warn"
if
[[
$STACK
=
"cedar-14"
]]
;
then
if
[[
$STACK
=
"cedar-14"
]]
;
then
assertCaptured
"python-3.4.0"
assertCaptured
"python-3.4.0"
assertCaptured
"security update!"
assertCapturedSuccess
assertCapturedSuccess
else
else
assertCapturedError
assertCapturedError
fi
fi
}
}
# This fail
testPython3_4_fail
()
{
testPython3_4
()
{
compile
"python3_4_fail"
compile
"python3_4"
assertCaptured
"Aborting"
assertCaptured
"python-3.4.9"
assertCapturedError
assertCapturedError
}
}
# This fail
testPython3_5
()
{
compile
"python3_5"
assertCaptured
"python-3.5.6"
assertCapturedSuccess
}
testPython3_5_warn
()
{
testPython3_5_warn
()
{
compile
"python3_5_warn"
compile
"python3_5_warn"
if
[[
$STACK
=
"cedar-14"
]]
;
then
if
[[
$STACK
=
"cedar-14"
]]
;
then
...
@@ -134,14 +161,18 @@ testPython3_5_warn() {
...
@@ -134,14 +161,18 @@ testPython3_5_warn() {
fi
fi
}
}
# This will fail
testPython3_5_fail
()
{
testPython3_5
()
{
compile
"python3_5_fail"
compile
"python3_5"
assertCaptured
"Aborting"
assertCaptured
"python-3.5.6"
assertCapturedError
assertCapturedError
}
}
# This will warn
testPython3_6
()
{
compile
"python3_6"
assertCaptured
"python-3.6.7"
assertCapturedSuccess
}
testPython3_6_warn
()
{
testPython3_6_warn
()
{
compile
"python3_6_warn"
compile
"python3_6_warn"
assertCaptured
"python-3.6.5"
assertCaptured
"python-3.6.5"
...
@@ -149,33 +180,36 @@ testPython3_6_warn() {
...
@@ -149,33 +180,36 @@ testPython3_6_warn() {
assertCapturedSuccess
assertCapturedSuccess
}
}
testPython3_6
()
{
testPython3_6_fail
()
{
compile
"python3_6"
compile
"python3_6_fail"
assertCaptured
"python-3.6.6"
assertCaptured
"Aborting"
assertCapturedSuccess
}
# This will fail
testPython3_6_7
()
{
compile
"python3_6_7"
assertCaptured
"python-3.6.7"
assertCapturedError
assertCapturedError
}
}
testPython3_7
()
{
testPython3_7
()
{
compile
"python3_7"
compile
"python3_7"
if
[[
$STACK
=
"cedar-14"
]]
;
then
assertCapturedError
else
assertCaptured
"python-3.7.1"
assertCapturedSuccess
fi
}
testPython3_7_warn
()
{
compile
"python3_7_warn"
if
[[
$STACK
=
"cedar-14"
]]
;
then
if
[[
$STACK
=
"cedar-14"
]]
;
then
assertCapturedError
assertCapturedError
else
else
assertCaptured
"python-3.7.0"
assertCaptured
"python-3.7.0"
assertCaptured
"security update!"
assertCapturedSuccess
assertCapturedSuccess
fi
fi
}
}
# This will fail
testPython3_7_fail
()
{
testPython3_7_1
()
{
compile
"python3_7_fail"
compile
"python3_7_1"
assertCaptured
"Aborting"
assertCaptured
"python-3.7.1"
assertCapturedError
assertCapturedError
}
}
...
...
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