continue Stencila detection if /binder dir is present, improve
MODIFY
repo2docker/buildpacks/base.py
repo2docker/buildpacks/base.py
@@ -272,9 +272,6 @@ class BuildPack:
self._stencila_manifest_dir = None
- if os.path.exists('binder'):
- return self._stencila_manifest_dir
-
for root, dirs, files in os.walk("."):
if "manifest.xml" in files:
self.log.debug("Found a manifest.xml at %s", root)
@@ -294,10 +291,7 @@ class BuildPack:
# look at the content of the jats.xml file to extract the required execution contexts
- self._stencila_manifest_contexts = None
-
- if os.path.exists('binder'):
- return self._stencila_manifest_contexts
+ self._stencila_manifest_contexts = []
for root, dirs, files in os.walk("."):
for filename in files:

MODIFY
repo2docker/buildpacks/r.py
repo2docker/buildpacks/r.py
@@ -79,8 +79,7 @@ class RBuildPack(PythonBuildPack):
return True
description_R = 'DESCRIPTION'
- if not os.path.exists('binder'):
- if os.path.exists(description_R) or (self.stencila_manifest_contexts and "r" in self.stencila_manifest_contexts):
+ if (not os.path.exists('binder') and os.path.exists(description_R)) or 'r' in self.stencila_manifest_contexts:
if not self.checkpoint_date:
# no R snapshot date set through runtime.txt
# set the R runtime to the latest date that is guaranteed to be on MRAN across timezones

continue Stencila detection if /binder dir is present, improve