annotate Tools/scripts/README @ 73323:dad02a080bbc

Improve byte-compilation in packaging to be independent of -O or -B. The code I fixed to comply with PEP 3147 still had one bug: When run under python -O, some paths for pyc files would be pyo, because I called imp.cache_from_source without explicit debug_override argument in some places, and under -O that would return .pyo (this is well explained in the imp docs). Now all code (util.byte_compile, build_py, install_lib) can create .pyo files according to options given by users, without interference from the calling Python’s own optimize mode. On a related topic, I also removed the code that prevented byte compilation under python -B. The rationale is that packaging gives control over the creation of pyc files to the user with its own explicit option, and the behavior should not be changed if the calling Python happens to run with -B for whatever reason. I will argue that this is a bug fix and ask to be allowed to backport this change to distutils. Finally, I moved one nugget of information about the --compile and --optimize options from the source into the doc. It clears up a misunderstanding that I (and maybe other people) had.
author Éric Araujo <merwok@netwok.org>
date Thu, 03 Nov 2011 05:08:28 +0100
parents 0b52b6f1bfab
children d02588a26057
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
63624
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
1 This directory contains a collection of executable Python scripts that are
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
2 useful while building, extending or managing Python. Some (e.g., dutree or lll)
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
3 are also generally useful UNIX tools.
2472
dd2845d06eb3 moved lots of scripts from Demo/scripts to Tools/scripts
Guido van Rossum <guido@python.org>
parents:
diff changeset
4
63624
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
5 2to3 Main script for running the 2to3 conversion tool
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
6 analyze_dxp.py Analyzes the result of sys.getdxp()
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
7 byext.py Print lines/words/chars stats of files by extension
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
8 byteyears.py Print product of a file's size and age
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
9 checkpyc.py Check presence and validity of ".pyc" files
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
10 cleanfuture.py Fix redundant Python __future__ statements
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
11 combinerefs.py A helper for analyzing PYTHONDUMPREFS output
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
12 copytime.py Copy one file's atime and mtime to another
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
13 crlf.py Change CRLF line endings to LF (Windows to Unix)
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
14 db2pickle.py Dump a database file to a pickle
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
15 diff.py Print file diffs in context, unified, or ndiff formats
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
16 dutree.py Format du(1) output as a tree sorted by size
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
17 eptags.py Create Emacs TAGS file for Python modules
71687
0b52b6f1bfab Clean up description of Tools/scripts/run_tests.py.
Nadeem Vawda <nadeem.vawda@gmail.com>
parents: 67227
diff changeset
18 find_recursionlimit.py Find the maximum recursion limit on this machine
63624
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
19 finddiv.py A grep-like tool that looks for division operators
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
20 findlinksto.py Recursively find symbolic links to a given path prefix
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
21 findnocoding.py Find source files which need an encoding declaration
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
22 fixcid.py Massive identifier substitution on C source files
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
23 fixdiv.py Tool to fix division operators.
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
24 fixheader.py Add some cpp magic to a C include file
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
25 fixnotice.py Fix the copyright notice in source files
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
26 fixps.py Fix Python scripts' first line (if #!)
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
27 ftpmirror.py FTP mirror script
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
28 google.py Open a webbrowser with Google
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
29 gprof2html.py Transform gprof(1) output into useful HTML
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
30 h2py.py Translate #define's into Python assignments
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
31 idle3 Main program to start IDLE
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
32 ifdef.py Remove #if(n)def groups from C sources
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
33 lfcr.py Change LF line endings to CRLF (Unix to Windows)
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
34 linktree.py Make a copy of a tree with links to original files
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
35 lll.py Find and list symbolic links in current directory
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
36 mailerdaemon.py Parse error messages from mailer daemons (Sjoerd&Jack)
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
37 make_ctype.py Generate ctype.h replacement in stringobject.c
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
38 md5sum.py Print MD5 checksums of argument files
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
39 mkreal.py Turn a symbolic link into a real file or directory
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
40 ndiff.py Intelligent diff between text files (Tim Peters)
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
41 nm2def.py Create a template for PC/python_nt.def (Marc Lemburg)
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
42 objgraph.py Print object graph from nm output on a library
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
43 parseentities.py Utility for parsing HTML entity definitions
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
44 patchcheck.py Perform common checks and cleanup before committing
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
45 pathfix.py Change #!/usr/local/bin/python into something else
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
46 pdeps.py Print dependencies between Python modules
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
47 pickle2db.py Load a pickle generated by db2pickle.py to a database
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
48 pindent.py Indent Python code, giving block-closing comments
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
49 ptags.py Create vi tags file for Python modules
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
50 pydoc3 Python documentation browser
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
51 pysource.py Find Python source files
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
52 redemo.py Basic regular expression demonstration facility
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
53 reindent.py Change .py files to use 4-space indents
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
54 reindent-rst.py Fix-up reStructuredText file whitespace
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
55 rgrep.py Reverse grep through a file (useful for big logfiles)
71687
0b52b6f1bfab Clean up description of Tools/scripts/run_tests.py.
Nadeem Vawda <nadeem.vawda@gmail.com>
parents: 67227
diff changeset
56 run_tests.py Run the test suite with more sensible default options
63624
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
57 serve.py Small wsgiref-based web server, used in make serve in Doc
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
58 suff.py Sort a list of files by suffix
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
59 svneol.py Set svn:eol-style on all files in directory
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
60 texi2html.py Convert GNU texinfo files into HTML
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
61 treesync.py Synchronize source trees (very idiosyncratic)
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
62 untabify.py Replace tabs with spaces in argument files
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
63 win_add2path.py Add Python to the search path on Windows
7a47c4d30f6e Update README, remove obsolete scripts.
Georg Brandl <georg@python.org>
parents: 59478
diff changeset
64 which.py Find a program in $PATH