From 5a9907bcdec2744038455349c3b35fd50b347aeb Mon Sep 17 00:00:00 2001 From: oesteban Date: Fri, 12 Jul 2019 16:28:45 -0700 Subject: [PATCH] fix(install): allow pybids to be missing for update --- templateflow/conf/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/templateflow/conf/__init__.py b/templateflow/conf/__init__.py index 24b6df72..69a0c9cf 100644 --- a/templateflow/conf/__init__.py +++ b/templateflow/conf/__init__.py @@ -5,7 +5,6 @@ from warnings import warn from pathlib import Path from pkg_resources import resource_filename -from .bids import Layout TF_DEFAULT_HOME = Path.home() / '.cache' / 'templateflow' TF_HOME = Path(getenv('TEMPLATEFLOW_HOME', str(TF_DEFAULT_HOME))) @@ -76,6 +75,11 @@ def update_home(force=False): return False -TF_LAYOUT = Layout( - str(TF_HOME), validate=False, config='templateflow', - ignore=['.git', '.datalad', '.gitannex', '.gitattributes', 'scripts']) +TF_LAYOUT = None +try: + from .bids import Layout + TF_LAYOUT = Layout( + str(TF_HOME), validate=False, config='templateflow', + ignore=['.git', '.datalad', '.gitannex', '.gitattributes', 'scripts']) +except ImportError: + pass