Merge pull request #261 from betatim/detect-subdir-requirements

Fix detecting dependency files in binder/ subidr
pull/264/head
Carol Willing 2018-03-16 08:04:00 -07:00 zatwierdzone przez GitHub
commit 2810b8a4de
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
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
)
]