build from DESCRIPTION w/o runtime.txt

pull/406/head
Bastian Greshake Tzovaras 2018-09-20 20:58:45 +03:00
rodzic 4a1b504dd2
commit 834d74bbe1
1 zmienionych plików z 11 dodań i 5 usunięć

Wyświetl plik

@ -69,7 +69,14 @@ class RBuildPack(PythonBuildPack):
""" """
# If no date is found, then self.checkpoint_date will be False # If no date is found, then self.checkpoint_date will be False
# Otherwise, it'll be a date object, which will evaluate to True # Otherwise, it'll be a date object, which will evaluate to True
return bool(self.checkpoint_date) if bool(self.checkpoint_date):
return True
description_R = 'DESCRIPTION'
if not os.path.exists('binder') and os.path.exists(description_R):
if not self.checkpoint_date:
self._checkpoint_date = datetime.date.today() - datetime.timedelta(days=2)
self._runtime = "r-{}".format(str(self._checkpoint_date))
return True
def get_path(self): def get_path(self):
""" """
@ -257,13 +264,12 @@ class RBuildPack(PythonBuildPack):
) )
] ]
descriptionR_path = self.binder_path('DESCRIPTION') description_R = 'DESCRIPTION'
if os.path.exists(descriptionR_path): if not os.path.exists('binder') and os.path.exists(description_R):
assemble_scripts += [ assemble_scripts += [
( (
"${NB_USER}", "${NB_USER}",
'R --quiet -e "devtools::install_git(\'{}\')"'.format( 'R --quiet -e "devtools::install_git(\'.\')"'
self.binder_path('.'))
) )
] ]