in the module of the command classes that have command-specific
help options. This lets us keep the principle of lazily importing
the ccompiler module, and also gets away from defining non-methods
at class level.
values that "--foo" can take for various commands: eg. what formats for
"sdist" and "bdist", what compilers for "build_ext" and "build_clib".
I have *not* reviewed this patch; I'm checking it in as-is because it also
fixes a paper-bag-over-head bug in bdist.py, and because I won't have
time to review it properly for several days: so someone else can
test it for me, instead!
* Command method 'find_peer()' -> 'get_finalized_command()'
* Command method 'run_peer()' -> 'run_command()'
Also deleted the 'get_command_option()' method from Command, and
fixed the one place where it was used (in "bdist_dumb").
necessary to support it.
Details:
- build command additionally calls build_scripts
- build_scripts builds your scripts in 'build/scripts' and adjusts the
first line if it begins with "#!" and ends with "python", optionally
ending with commandline options (like -O, -t ...). Adjusting means we
write the current path to the Python interpreter in the first line.
- install_scripts copies the scripts to the install_scripts dir
- install_data copies your data_files in install_data. You can
supply individual directories for your data_files:
data_files = ['doc/info.txt', # copy this file in install_scripts dir
('testdata', ['a.dat', 'b.dat']), # copy these files in
# install_scripts/testdata
('/etc', ['packagerc']), # copy this in /etc. When --root is
# given, copy this in rootdir/etc
]
So you can use the --root option with absolute data paths.
* replaced build_lib.py with build_clib.py
* renamed the class in build_clib.py
* changed all references to 'build_lib' command in other command classes
'--help-commands' option).
Shuffled imports around in a few command modules to avoid expensive
up-front import of sysconfig (and resulting delays in generating list
of all commands).
Tweaked some help strings to be consistent with documentation.
Don't call 'set_final_options()' in 'run()' anymore -- that's now
guaranteed to be taken care of for us by the Distribution instance.
of the 'install_py' command rather than 'build_py'. Obviously, this
meant that the 'build_py' and 'install_py' modules had to change; less
obviously, so did 'install' and 'build', since these higher-level
commands must make options available to control the lower-level
commands, and some compilation-related options had to migrate with the
code.