From 6f445bea25fbbb9deb116bd9162a932e3b586209 Mon Sep 17 00:00:00 2001 From: Jason Grout Date: Tue, 16 Aug 2022 07:27:55 -0600 Subject: [PATCH] Make the jupyterlite_contents glob recursive. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we have shifted to using globs for the contents, we might as well enable the strictly more powerful ** recursive syntax. See https://docs.python.org/3/library/glob.html#glob.glob "If recursive is true, the pattern “**” will match any files and zero or more directories, subdirectories and symbolic links to directories. If the pattern is followed by an os.sep or os.altsep then files will not match." --- jupyterlite_sphinx/jupyterlite_sphinx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jupyterlite_sphinx/jupyterlite_sphinx.py b/jupyterlite_sphinx/jupyterlite_sphinx.py index 48aa69c1..877e8727 100644 --- a/jupyterlite_sphinx/jupyterlite_sphinx.py +++ b/jupyterlite_sphinx/jupyterlite_sphinx.py @@ -300,7 +300,7 @@ def jupyterlite_build(app: Sphinx, error): jupyterlite_contents = [ match for pattern in jupyterlite_contents - for match in glob.glob(pattern) + for match in glob.glob(pattern, recursive=True) ] jupyterlite_dir = app.env.config.jupyterlite_dir