File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -297,9 +297,10 @@ def byte_compile (py_files,
297297 prefix = None , base_dir = None ,
298298 verbose = 1 , dry_run = 0 ,
299299 direct = None ):
300- """Byte-compile a collection of Python source files to either
301- .pyc or .pyo files in the same directory. 'optimize' must be
302- one of the following:
300+ """Byte-compile a collection of Python source files to either .pyc
301+ or .pyo files in the same directory. 'py_files' is a list of files
302+ to compile; any files that don't end in ".py" are silently skipped.
303+ 'optimize' must be one of the following:
303304 0 - don't optimize (generate .pyc)
304305 1 - normal optimization (like "python -O")
305306 2 - extra optimization (like "python -OO")
@@ -378,8 +379,9 @@ def byte_compile (py_files,
378379
379380 for file in py_files :
380381 if file [- 3 :] != ".py" :
381- raise ValueError , \
382- "invalid filename: %s doesn't end with '.py'" % `file`
382+ # This lets us be lazy and not filter filenames in
383+ # the "install_lib" command.
384+ continue
383385
384386 # Terminology from the py_compile module:
385387 # cfile - byte-compiled file
You can’t perform that action at this time.
0 commit comments