packages/lang/python/python/patches/021-compileall-add-recursion-option.patch
Jeffery To 83b300aa83 python: Update to 2.7.17, refresh patches
Patches already merged and so removed:
* 011-fix-ssl-build-use-have-npn.patch
* 019-bpo-36216-Add-check-for-characters-in-netloc-that-normalize-to-separators-GH-12216.patch
* 020-bpo-36216-Only-print-test-messages-when-verbose-GH-12291.patch
* 021-2.7-bpo-35121-prefix-dot-in-domain-for-proper-subdom.patch
* 022-bpo-30458-Disallow-control-chars-in-http-URLs-GH-13315.patch
* 023-bpo-35907-Avoid-file-reading-as-disallowing-the-unnecessary-URL-scheme-in-urllib-GH-11842.patch
* 027-bpo-38243-Escape-the-server-title-of-DocXMLRPCServer.patch
* 028-bpo-34155-Dont-parse-domains-containing-GH-13079.patch

Patches no longer necessary and so removed:
* 017_lib2to3_fix_pyc_search.patch

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2019-10-21 23:30:53 +08:00

31 lines
1.3 KiB
Diff

--- a/Lib/compileall.py
+++ b/Lib/compileall.py
@@ -152,10 +152,10 @@ def main():
"""Script main program."""
import getopt
try:
- opts, args = getopt.getopt(sys.argv[1:], 'lfqd:x:i:')
+ opts, args = getopt.getopt(sys.argv[1:], 'lr:fqd:x:i:')
except getopt.error, msg:
print msg
- print "usage: python compileall.py [-l] [-f] [-q] [-d destdir] " \
+ print "usage: python compileall.py [-l] [-r recursion] [-f] [-q] [-d destdir] " \
"[-x regexp] [-i list] [directory|file ...]"
print
print "arguments: zero or more file and directory names to compile; " \
@@ -164,6 +164,7 @@ def main():
print
print "options:"
print "-l: don't recurse into subdirectories"
+ print "-r recursion: control the maximum recursion level"
print "-f: force rebuild even if timestamps are up-to-date"
print "-q: output only error messages"
print "-d destdir: directory to prepend to file paths for use in " \
@@ -187,6 +188,7 @@ def main():
flist = None
for o, a in opts:
if o == '-l': maxlevels = 0
+ if o == '-r': maxlevels = int(a)
if o == '-d': ddir = a
if o == '-f': force = 1
if o == '-q': quiet = 1