Skip to content

Commit f9abea6

Browse files
committed
update docs and allow recursion into node modules for mtime
1 parent 7746ef9 commit f9abea6

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

{{cookiecutter.github_project_name}}/setupbase.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,19 @@ def create_cmdclass(prerelease_cmd=None, package_data_spec=None,
147147
We use specs so that we can find the files *after* the build
148148
command has run.
149149
The glob patterns can contain at most one '**' per pattern.
150+
151+
We use specs so that we can find the files *after* the build
152+
command has run.
153+
The glob patterns can contain at most one '**' per pattern.
154+
150155
The package data glob patterns should be relative paths from the package
151156
folder containing the __init__.py file, which is given as the package
152157
name.
158+
e.g. `dict(foo=['./bar/*', './baz/**'])`
159+
153160
The data files glob patterns should be absolute paths or relative paths
154161
from the root directory of the repository.
162+
e.g. `('share/foo/bar', ['pkgname/bizz/*', 'pkgname/baz/**'])`
155163
"""
156164
wrapped = [prerelease_cmd] if prerelease_cmd else []
157165
if package_data_spec or data_files_spec:
@@ -278,9 +286,6 @@ def recursive_mtime(path, newest=True):
278286
return mtime(path)
279287
current_extreme = None
280288
for dirname, dirnames, filenames in os.walk(path, topdown=False):
281-
# Don't recurse into node_modules
282-
if 'node_modules' in dirnames:
283-
dirnames.remove('node_modules')
284289
for filename in filenames:
285290
mt = mtime(pjoin(dirname, filename))
286291
if newest: # Put outside of loop?

0 commit comments

Comments
 (0)