-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As part of adding Poetry + `.python-version` file support, a fair amount of buildpack refactoring will be required. This backports some of the additional test scenarios we now have in the new Python CNB, along with some test general improvements. It's been split out of later PRs for easier review.
- Loading branch information
Showing
29 changed files
with
343 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
printenv | sort \ | ||
| grep -vE '^(_|BUILDPACK_LOG_FILE|DYNO|OLDPWD|REQUEST_ID|SHLVL)=' \ | ||
| sed --regexp-extended \ | ||
--expression 's#(=/tmp/build_)[^:/]+#\1<hash>#' \ | ||
--expression 's#^(ENV_DIR=/tmp/).*#\1...#' \ | ||
--expression 's#^(SOURCE_VERSION=).*#\1...#' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ BUILD_DIR="${1}" | |
|
||
cd "${BUILD_DIR}" | ||
|
||
exec bin/test-entrypoints | ||
exec bin/test-entrypoints.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
set -euo pipefail | ||
|
||
exec bin/test-entrypoints | ||
exec bin/test-entrypoints.sh |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,6 @@ verify_ssl = true | |
name = "pypi" | ||
|
||
[packages] | ||
urllib3 = "*" | ||
typing-extensions = "*" | ||
|
||
[dev-packages] |
10 changes: 5 additions & 5 deletions
10
spec/fixtures/pipenv_python_version_unspecified/Pipfile.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
spec/fixtures/pipenv_python_version_unspecified/bin/compile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This file is run by the inline buildpack, and tests that the environment is | ||
# configured as expected for buildpacks that run after the Python buildpack. | ||
|
||
set -euo pipefail | ||
|
||
printenv | sort | grep -vE '^(_|BUILDPACK_LOG_FILE|DYNO|HOME|PWD|REQUEST_ID|SHLVL|SOURCE_VERSION|STACK)=' | ||
echo | ||
|
||
python -c 'import pprint, sys; pprint.pp(sys.path)' | ||
echo | ||
|
||
# TODO: Investigate why 'pipenv graph' doesn't work here. | ||
# TODO: Remove --disable-pip-version-check in favour of exporting PIP_DISABLE_PIP_VERSION_CHECK | ||
pip list --disable-pip-version-check | ||
echo | ||
|
||
python -c 'import typing_extensions; print(typing_extensions)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This file is run by the inline buildpack. | ||
|
||
set -euo pipefail | ||
|
||
echo "Inline" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This file is here to confirm we don't try and create the fallback requirements | ||
# file containing '-e .' when using Pipenv. | ||
|
||
from setuptools import setup | ||
|
||
setup( | ||
name='test', | ||
install_requires=['six'], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This file is run by the inline buildpack, and tests that the environment is | ||
# configured as expected for buildpacks that run after the Python buildpack. | ||
|
||
set -euo pipefail | ||
|
||
printenv | sort | grep -vE '^(_|BUILDPACK_LOG_FILE|DYNO|HOME|PWD|REQUEST_ID|SHLVL|SOURCE_VERSION|STACK)=' | ||
echo | ||
|
||
python -c 'import pprint, sys; pprint.pp(sys.path)' | ||
echo | ||
|
||
# TODO: Remove --disable-pip-version-check in favour of exporting PIP_DISABLE_PIP_VERSION_CHECK | ||
pip list --disable-pip-version-check | ||
echo | ||
|
||
python -c 'import typing_extensions; print(typing_extensions)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This file is run by the inline buildpack. | ||
|
||
set -euo pipefail | ||
|
||
echo "Inline" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# This package has been picked since it has no dependencies and is small/fast to install. | ||
typing-extensions==4.12.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ BUILD_DIR="${1}" | |
|
||
cd "${BUILD_DIR}" | ||
|
||
exec bin/test-entrypoints | ||
exec bin/test-entrypoints.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
|
||
set -euo pipefail | ||
|
||
exec bin/test-entrypoints | ||
exec bin/test-entrypoints.sh |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
an-invalid-requirement! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.