Skip to content

Commit

Permalink
fix(install): allow pybids to be missing for update
Browse files Browse the repository at this point in the history
  • Loading branch information
oesteban committed Jul 12, 2019
1 parent 33035a0 commit 5a9907b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions templateflow/conf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down Expand Up @@ -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

0 comments on commit 5a9907b

Please sign in to comment.