kopia lustrzana https://github.com/jupyterhub/repo2docker
clarify comments about requirements3.txt
rodzic
593d892e0f
commit
211a6978c6
|
@ -31,18 +31,15 @@ class PythonBuildPack(CondaBuildPack):
|
||||||
"""Return series of build-steps specific to this repository.
|
"""Return series of build-steps specific to this repository.
|
||||||
"""
|
"""
|
||||||
# If we have a runtime.txt & that's set to python-2.7,
|
# If we have a runtime.txt & that's set to python-2.7,
|
||||||
# we will *not* install requirements.txt but will find &
|
# requirements.txt will be installed in the *kernel* env
|
||||||
# install a requirements3.txt file if it exists.
|
# and requirements3.txt (if it exists)
|
||||||
# This way, when using python2 env, requirements.txt will
|
# will be installed in the python 3 notebook server env.
|
||||||
# be installed in the python2 env, and requirements3.txt
|
|
||||||
# will be installed in python3 env. This is less of a
|
|
||||||
# surprise than requiring python2 to be requirements2.txt tho.
|
|
||||||
assemble_scripts = super().get_assemble_scripts()
|
assemble_scripts = super().get_assemble_scripts()
|
||||||
setup_py = 'setup.py'
|
setup_py = 'setup.py'
|
||||||
pip = 'pip'
|
pip = 'pip'
|
||||||
if self.py2:
|
if self.py2:
|
||||||
# using python 2 kernel,
|
# using python 2 kernel,
|
||||||
# requirements3.txt allows installation in the notebook env
|
# requirements3.txt allows installation in the notebook server env
|
||||||
nb_requirements_file = self.binder_path('requirements3.txt')
|
nb_requirements_file = self.binder_path('requirements3.txt')
|
||||||
if os.path.exists(nb_requirements_file):
|
if os.path.exists(nb_requirements_file):
|
||||||
assemble_scripts.append((
|
assemble_scripts.append((
|
||||||
|
|
Ładowanie…
Reference in New Issue