Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix caching of editable VCS Pipenv dependencies #1528

Merged
merged 1 commit into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Updated pip from 23.3.1 to 23.3.2. ([#1524](https://github.com/heroku/heroku-buildpack-python/pull/1524))
- Fixed repeat/cached Pipenv builds of local `file =` dependencies. ([#1526](https://github.com/heroku/heroku-buildpack-python/pull/1526))
- Fixed the caching of editable VCS Pipenv dependency repositories. ([#1528](https://github.com/heroku/heroku-buildpack-python/pull/1528))

## [v241] - 2023-12-08

Expand Down
4 changes: 2 additions & 2 deletions bin/steps/pip-install
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
exit 1
fi

/app/.heroku/python/bin/pip install -r requirements.txt --exists-action=w --src=/app/.heroku/src --disable-pip-version-check --no-cache-dir --progress-bar off 2>&1 | tee "$WARNINGS_LOG" | cleanup | indent
/app/.heroku/python/bin/pip install -r requirements.txt --exists-action=w --src='/app/.heroku/src' --disable-pip-version-check --no-cache-dir --progress-bar off 2>&1 | tee "$WARNINGS_LOG" | cleanup | indent
PIP_STATUS="${PIPESTATUS[0]}"
set -e

Expand All @@ -46,7 +46,7 @@ if [ ! "$SKIP_PIP_INSTALL" ]; then
if [ "$INSTALL_TEST" ]; then
if [[ -f requirements-test.txt ]]; then
puts-step "Installing test dependencies…"
/app/.heroku/python/bin/pip install -r requirements-test.txt --exists-action=w --src=./.heroku/src --disable-pip-version-check --no-cache-dir 2>&1 | cleanup | indent
/app/.heroku/python/bin/pip install -r requirements-test.txt --exists-action=w --src='/app/.heroku/src' --disable-pip-version-check --no-cache-dir 2>&1 | cleanup | indent
fi
fi
fi
6 changes: 3 additions & 3 deletions bin/steps/pipenv
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ if [[ -f Pipfile ]]; then
# Install the test dependencies, for CI.
if [ "$INSTALL_TEST" ]; then
puts-step "Installing test dependencies"
/app/.heroku/python/bin/pipenv install --dev --system --deploy 2>&1 | cleanup | indent
/app/.heroku/python/bin/pipenv install --dev --system --deploy --extra-pip-args='--src=/app/.heroku/src' 2>&1 | cleanup | indent

# Install the dependencies.
elif [[ ! -f Pipfile.lock ]]; then
puts-step "Installing dependencies with Pipenv ${PIPENV_VERSION}"
/app/.heroku/python/bin/pipenv install --system --skip-lock 2>&1 | indent
/app/.heroku/python/bin/pipenv install --system --skip-lock --extra-pip-args='--src=/app/.heroku/src' 2>&1 | indent

else
pipenv-to-pip Pipfile.lock > requirements.txt
cp requirements.txt .heroku/python/requirements-declared.txt

puts-step "Installing dependencies with Pipenv ${PIPENV_VERSION}"
/app/.heroku/python/bin/pipenv install --system --deploy 2>&1 | indent
/app/.heroku/python/bin/pipenv install --system --deploy --extra-pip-args='--src=/app/.heroku/src' 2>&1 | indent
fi
fi
20 changes: 10 additions & 10 deletions spec/hatchet/pipenv_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
remote:
remote: ==> .heroku/python/lib/python.*/site-packages/easy-install.pth <==
remote: /tmp/build_.*/packages/local_package_setup_py
remote: /tmp/build_.*/src/gunicorn
remote: /app/.heroku/src/gunicorn
remote:
remote: ==> .heroku/python/lib/python.*/site-packages/__editable___local_package_pyproject_toml_0_0_1_finder.py <==
remote: .*
Expand All @@ -351,7 +351,7 @@
remote: ==> .heroku/python/lib/python.*/site-packages/__editable__.local_package_pyproject_toml-0.0.1.pth <==
remote: import __editable___.*
remote: ==> .heroku/python/lib/python.*/site-packages/gunicorn.egg-link <==
remote: /tmp/build_.*/src/gunicorn
remote: /app/.heroku/src/gunicorn
remote: .
remote: ==> .heroku/python/lib/python.*/site-packages/local_package_setup_py.egg-link <==
remote: /tmp/build_.*/packages/local_package_setup_py
Expand All @@ -365,7 +365,7 @@
remote:
remote: ==> .heroku/python/lib/python.*/site-packages/easy-install.pth <==
remote: /tmp/build_.*/packages/local_package_setup_py
remote: /tmp/build_.*/src/gunicorn
remote: /app/.heroku/src/gunicorn
remote:
remote: ==> .heroku/python/lib/python.*/site-packages/__editable___local_package_pyproject_toml_0_0_1_finder.py <==
remote: .*
Expand All @@ -375,7 +375,7 @@
remote: ==> .heroku/python/lib/python.*/site-packages/__editable__.local_package_pyproject_toml-0.0.1.pth <==
remote: import __editable___.*
remote: ==> .heroku/python/lib/python.*/site-packages/gunicorn.egg-link <==
remote: /tmp/build_.*/src/gunicorn
remote: /app/.heroku/src/gunicorn
remote: .
remote: ==> .heroku/python/lib/python.*/site-packages/local_package_setup_py.egg-link <==
remote: /tmp/build_.*/packages/local_package_setup_py
Expand All @@ -392,7 +392,7 @@

==> .heroku/python/lib/python.*/site-packages/easy-install.pth <==
/app/packages/local_package_setup_py
/app/src/gunicorn
/app/.heroku/src/gunicorn

==> .heroku/python/lib/python.*/site-packages/__editable___local_package_pyproject_toml_0_0_1_finder.py <==
.*
Expand All @@ -402,7 +402,7 @@
==> .heroku/python/lib/python.*/site-packages/__editable__.local_package_pyproject_toml-0.0.1.pth <==
import __editable___.*
==> .heroku/python/lib/python.*/site-packages/gunicorn.egg-link <==
/app/src/gunicorn
/app/.heroku/src/gunicorn
.
==> .heroku/python/lib/python.*/site-packages/local_package_setup_py.egg-link <==
/app/packages/local_package_setup_py
Expand All @@ -421,8 +421,8 @@
remote: .*
remote:
remote: ==> .heroku/python/lib/python.*/site-packages/easy-install.pth <==
remote: /app/.heroku/src/gunicorn
remote: /tmp/build_.*/packages/local_package_setup_py
remote: /tmp/build_.*/src/gunicorn
remote:
remote: ==> .heroku/python/lib/python.*/site-packages/__editable___local_package_pyproject_toml_0_0_1_finder.py <==
remote: .*
Expand All @@ -432,7 +432,7 @@
remote: ==> .heroku/python/lib/python.*/site-packages/__editable__.local_package_pyproject_toml-0.0.1.pth <==
remote: import __editable___.*
remote: ==> .heroku/python/lib/python.*/site-packages/gunicorn.egg-link <==
remote: /tmp/build_.*/src/gunicorn
remote: /app/.heroku/src/gunicorn
remote: .
remote: ==> .heroku/python/lib/python.*/site-packages/local_package_setup_py.egg-link <==
remote: /tmp/build_.*/packages/local_package_setup_py
Expand All @@ -445,8 +445,8 @@
remote: .*
remote:
remote: ==> .heroku/python/lib/python.*/site-packages/easy-install.pth <==
remote: /app/.heroku/src/gunicorn
remote: /tmp/build_.*/packages/local_package_setup_py
remote: /tmp/build_.*/src/gunicorn
remote:
remote: ==> .heroku/python/lib/python.*/site-packages/__editable___local_package_pyproject_toml_0_0_1_finder.py <==
remote: .*
Expand All @@ -456,7 +456,7 @@
remote: ==> .heroku/python/lib/python.*/site-packages/__editable__.local_package_pyproject_toml-0.0.1.pth <==
remote: import __editable___.*
remote: ==> .heroku/python/lib/python.*/site-packages/gunicorn.egg-link <==
remote: /tmp/build_.*/src/gunicorn
remote: /app/.heroku/src/gunicorn
remote: .
remote: ==> .heroku/python/lib/python.*/site-packages/local_package_setup_py.egg-link <==
remote: /tmp/build_.*/packages/local_package_setup_py
Expand Down