Commits

Ronny Pfannschmidt  committed 7dc496b

fixes to make externals work

  • Participants
  • Parent commits 83346dd

Comments (0)

Files changed (3)

File couchdb_compose/attachments.py

     attachments = composer.getlist('attachments')
     for attachment in attachments:
         if isinstance(attachment, str):
-            for path in composer.path.visit(attachment):
+            found = list(composer.path.visit(attachment))
+            if not found:
+                print '! attachments for', attachment, 'not found'
+            for path in found:
                 composer.add_attachment_from_file(path)
         else:
             for prefix, maybe_globs in attachment.items():

File couchdb_compose/composer.py

 from .ddoc import load_objects
 from .preprocess import run_preprocessors
 from .attachments import add_attachments
-actions = [load_objects, add_attachments, run_preprocessors]
+from .externals import include_externals
+actions = [
+    load_objects,
+    add_attachments,
+    include_externals,
+    run_preprocessors,
+]
 
 

File couchdb_compose/externals.py

 
     for external in externals:
         path = cache.ensure(external['name'], dir=1)
-        maybe_download_external(external, cache)
+        maybe_download_external(external, path)
         add_external(composer, external, path)