Skip to content

Commit 34c8090

Browse files
committed
Only set PIP_PYTHON at build time
Since it's not needed at run time after #264.
1 parent a531f74 commit 34c8090

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- The `PIP_PYTHON` env var is now only set at build time. ([#307](https://github.com/heroku/buildpacks-python/pull/307))
13+
1014
### Removed
1115

1216
- Stopped setting the `LANG` env var. ([#306](https://github.com/heroku/buildpacks-python/pull/306))

src/layers/pip_dependencies.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ pub(crate) fn install_dependencies(
5454
.map_err(PipDependenciesLayerError::CreateVenvCommand)?;
5555

5656
let mut layer_env = LayerEnv::new()
57-
// Since pip is installed in a different layer (outside of this venv), we have to explicitly
58-
// tell it to perform operations against this venv instead of the global Python install.
57+
// pip is installed in a separate build-only layer, we have to explicitly tell it to
58+
// perform operations against this venv instead of the global Python install.
5959
// https://pip.pypa.io/en/stable/cli/pip/#cmdoption-python
6060
.chainable_insert(
61-
Scope::All,
61+
Scope::Build,
6262
ModificationBehavior::Override,
6363
"PIP_PYTHON",
6464
&layer_path,

tests/pip_test.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ fn pip_basic_install_and_cache_reuse() {
8585
formatdoc! {"
8686
LD_LIBRARY_PATH=/layers/heroku_python/venv/lib:/layers/heroku_python/python/lib
8787
PATH=/layers/heroku_python/venv/bin:/layers/heroku_python/python/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
88-
PIP_PYTHON=/layers/heroku_python/venv
8988
PYTHONHOME=/layers/heroku_python/python
9089
PYTHONUNBUFFERED=1
9190
VIRTUAL_ENV=/layers/heroku_python/venv

0 commit comments

Comments
 (0)