Skip to content

Commit 8236dc8

Browse files
committed
only install pipenv in preassemble
save preassembly of pipenv for a later patch
1 parent 009d098 commit 8236dc8

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

repo2docker/buildpacks/pipfile/__init__.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ def get_preassemble_script_files(self):
7575
return files
7676

7777
def get_preassemble_scripts(self):
78+
"""scripts to run prior to staging the repo contents"""
79+
scripts = super().get_preassemble_scripts()
80+
# install pipenv to install dependencies within Pipfile.lock or Pipfile
81+
scripts.append(
82+
("${NB_USER}", "${KERNEL_PYTHON_PREFIX}/bin/pip install pipenv==2018.11.26")
83+
)
84+
return scripts
85+
86+
def get_assemble_scripts(self):
7887
"""Return series of build-steps specific to this repository.
7988
"""
8089
# If we have either Pipfile.lock, Pipfile, or runtime.txt declare the
@@ -113,11 +122,6 @@ def get_preassemble_scripts(self):
113122
# my_package_example = {path=".", editable=true}
114123
working_directory = self.binder_dir or "."
115124

116-
# install pipenv to install dependencies within Pipfile.lock or Pipfile
117-
assemble_scripts.append(
118-
("${NB_USER}", "${KERNEL_PYTHON_PREFIX}/bin/pip install pipenv==2018.11.26")
119-
)
120-
121125
# NOTES:
122126
# - Without prioritizing the PATH to KERNEL_PYTHON_PREFIX over
123127
# NB_SERVER_PYTHON_PREFIX, 'pipenv' draws the wrong conclusion about

0 commit comments

Comments
 (0)