Fix detecting dependency files in binder/ subidr

pull/261/head
Tim Head 2018-03-15 16:22:01 +01:00
rodzic 05168b037b
commit ed717955b1
3 zmienionych plików z 5 dodań i 6 usunięć

Wyświetl plik

@ -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()

Wyświetl plik

@ -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')

Wyświetl plik

@ -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
)
]