kopia lustrzana https://github.com/jupyterhub/repo2docker
Merge pull request #261 from betatim/detect-subdir-requirements
Fix detecting dependency files in binder/ subidrpull/264/head
commit
2810b8a4de
|
@ -1,7 +1,6 @@
|
|||
"""
|
||||
Buildpack for conda environments
|
||||
"""
|
||||
import glob
|
||||
import os
|
||||
import re
|
||||
|
||||
|
@ -124,6 +123,5 @@ class CondaBuildPack(BaseImage):
|
|||
))
|
||||
return super().get_assemble_scripts() + assembly_scripts
|
||||
|
||||
|
||||
def detect(self):
|
||||
return os.path.exists(self.binder_path('environment.yml')) and super().detect()
|
||||
|
|
|
@ -85,7 +85,8 @@ class PythonBuildPack(BaseImage):
|
|||
return assemble_scripts
|
||||
|
||||
def detect(self):
|
||||
return os.path.exists('requirements.txt') and super().detect()
|
||||
return (os.path.exists(self.binder_path('requirements.txt')) and
|
||||
super().detect())
|
||||
|
||||
|
||||
class Python2BuildPack(PythonBuildPack):
|
||||
|
@ -96,7 +97,6 @@ class Python2BuildPack(PythonBuildPack):
|
|||
'virtualenv'
|
||||
})
|
||||
|
||||
|
||||
def get_env(self):
|
||||
return super().get_env() + [
|
||||
('VENV2_PATH', '${APP_BASE}/venv2')
|
||||
|
|
|
@ -210,11 +210,12 @@ class RBuildPack(PythonBuildPack):
|
|||
),
|
||||
]
|
||||
|
||||
if os.path.exists('install.R'):
|
||||
installR_path = self.binder_path('install.R')
|
||||
if os.path.exists(installR_path):
|
||||
assemble_scripts += [
|
||||
(
|
||||
"${NB_USER}",
|
||||
"Rscript install.R"
|
||||
"Rscript %s" % installR_path
|
||||
)
|
||||
]
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue