Skip to content

Commit e7c93b0

Browse files
committed
update pipenv to 2022.1.8
pipenv 2018 doesn't actually clear its cache when asked to 2021.5.29 is the last to support 2.7, 3.5
1 parent 7577995 commit e7c93b0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

repo2docker/buildpacks/pipfile/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import toml
1313

14+
from ...semver import parse_version as V
1415
from ..conda import CondaBuildPack
1516

1617
VERSION_PAT = re.compile(r"\d+(\.\d+)*")
@@ -87,10 +88,15 @@ def get_preassemble_scripts(self):
8788
"""scripts to run prior to staging the repo contents"""
8889
scripts = super().get_preassemble_scripts()
8990
# install pipenv to install dependencies within Pipfile.lock or Pipfile
91+
if V(self.python_version) < V("3.6"):
92+
# last pipenv version to support 2.7, 3.5
93+
pipenv_version = "2021.5.29"
94+
else:
95+
pipenv_version = "2022.1.8"
9096
scripts.append(
9197
(
9298
"${NB_USER}",
93-
"${KERNEL_PYTHON_PREFIX}/bin/pip install --no-cache-dir pipenv==2018.11.26",
99+
f"${{KERNEL_PYTHON_PREFIX}}/bin/pip install --no-cache-dir pipenv=={pipenv_version}",
94100
)
95101
)
96102
return scripts

0 commit comments

Comments
 (0)