Added 'nuke_release_tree()' method to blow away the directory from
which the archive file(s) are created, and call it (conditionally)
from 'make_distribution()'.
Added 'keep_tree' option (false by default) to disable the call to
'nuke_release_tree()'.
install) the setup script itself.
Fixed 'build_module()' so we do *not* preserve file mode (which means
we can install read-only files, which makes the next installation
of this distribution fail -- at least under Unix); added a comment
explaining this.
consistency with 'build_ext' command option.
Changed 'compile()' and 'link_shared_object()' so 'include_dirs',
'libraries', and 'library_dirs' can be lists or tuples.
'generate_help()', 'wrap_text()' functions, and a little tiny test
of 'wrap_text()'.
Changed how caller states that one option is the boolean opposite of
another: added 'negative_opt' parameter to 'fancy_getopt()', and changed
to use it instead of parsing long option name.
want no output. Still no option for a happy medium though.
Added "--help" global option.
Changed 'parse_command_line()' to recognize help options (both for the
whole distribution and per-command), and to distinguish "regular run"
and "user asked for help" by returning false in the latter case.
Also in 'parse_command_line()', detect invalid command name on command
line by catching DistutilsModuleError.
a 'negative_opt' class attribute right after 'global_options'; changed
how we call 'fancy_getopt()' accordingly.
Initialize 'maintainer' and 'maintainer_email' attributes to Distribution
to avoid AttributeError when 'author' and 'author_email' not defined.
Initialize 'help' attribute in Command constructor (to avoid
AttributeError when user *doesn't* ask for help).
In 'setup()':
* show usage message before dying when we catch DistutilsArgError
* only run commands if 'parse_command_line()' returned true (that
way, we exit immediately when a help option is found)
* catch KeyboardInterrupt and IOError from running commands
Bulked up usage message to show --help options.
Comment, docstring, and error message tweaks.
Bunch of little bug fixes that appeared in building non-packagized
distributions. Mainly:
- brain-slip typo in 'get_package_dir()'
- don't try to os.path.join() an empty path tuple -- it doesn't like it
- more type-safety in 'build_module()'
Now supports the full range of intended formats (tar, ztar, gztar, zip).
"-f" no longer a short option for "--formats" -- conflicts with new
global option "--force"!
global options table.
Every Command instance now has its own copies of the global options,
which automatically fallback to the Distribution instance. Changes:
- initialize them in constructor
- added '__getattr__()' to handle the fallback logic
- changed every 'self.distribution.{verbose,dry_run}' in Command to
'self.{verbose,dry_run}'.
- filesystem utility methods ('copy_file()' et al) don't take 'update'
parameter anymore -- instead we pass 'not force' to the underlying
function as 'update'
Changed parsing of command line so that global options apply to all
commands as well -- that's how (eg.) Command.verbose will be initialized.
Simplified 'make_file()' to use 'newer_group()' (from util module).
Deleted some cruft.
Some docstring tweaks.
the code a bit and should make it work under Windows even with trailing
backslash.
Fixed a couple of docstrings.
Added comment about 'make_file()' possibly being redundant and unnecessary.
- change how we call it
- added methods 'library_dir_option()', 'library_option()', and
'find_library_file()' that it calls
Added 'force' flag; it's automatically "respected", because this class
always rebuilds everything! (Which it to say, "force=0" is not respected.)
Catch up with changes in 'gen_lib_options()':
- change how we call it
- added methods 'library_dir_option()', 'library_option()', and
'find_library_file()' that it calls
Added 'force' flag and changed compile/link methods to respect it.
has a directory component, then we only search for the library in
that one directory, ie. ignore the 'library_dirs' lists for that
one library.
Changed calling convention to 'gen_lib_options()' again: now, it takes
a CCompiler instance and calls methods on it instead of taking
format strings. Also implemented the new "library name" semantics
using the 'find_library_file()' method in the CCompiler instance.
Added 'force' flag to CCompiler; added to constructor and 'new_compiler()'.
Added 'warn()' method.
Catch up with renamed 'platdir' -> 'build_platlib' option in 'build'.
Don't call 'set_final_options()' in 'run()' anymore -- that's now
guaranteed to be taken care of for us by the Distribution instance.
If 'include_dirs' is a string, split it on os.pathsep (this is half-
hearted -- support for setting compile/link options on the command
line is totally lame and probably won't work at all).
Added 'get_source_files()' for use by 'dist' command.
Added code to 'build_extensions()' to figure out the "def file" to use
with MSVC++ and add it to the linker command line as an "extra_postarg".
Don't call 'set_final_options()' in 'run()' anymore -- that's now
guaranteed to be taken care of for us by the Distribution instance.
Rearranged to bit to allow outsiders (specifically, the 'dist' command)
to find out what modules we would build:
- 'find_modules()' renamed to 'find_package_modules()'
- most of 'build_modules()' abstracted out to 'find_modules()'
- added 'get_source_files()' (for the 'dist' command to use)
- drastically simplified 'build_modules()' -- now just a wrapper around
'find_modules()' and 'build_module()'
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.
- add 'extra_preargs' and 'extra_postargs' parameters (and use them!)
- got rid of 'build_info' kludge parameter
- added 'compiler_type' class attribute
- respect reordered arguments to 'gen_lib_options()'
Also added 'output_dir' parameter (catching up with older change in
CCompiler) -- BUT this is presently ignored by all methods!
Deleted some more docstrings redundant with CCompiler.
Dropped generated of "/DEF:" argument --- that's now done by
the 'build_ext' command.
- add 'extra_preargs' and 'extra_postargs' parameters (and use them!)
- added 'compiler_type' class attribute
- respect reordered arguments to 'gen_lib_options()'
which allowed us to get rid of the 'build_info' used in some places
(a temporary kludge to support MSVC++ "def" files).
Deleted big comment whining about that kludge.
Added 'compiler_type' class attribute.
Overhauled 'new_compiler()': now takes 'compiler' argument along with
'plat' (both optional with sensible defaults), and looks them both up
in the new 'default_compiler' and 'compiler_class' dictionaries to
figure out where to get the concrete compiler class from.
Reordered arguments to 'gen_lib_options()' to match the order in
which the arguments are generated (ie. -L before -l).
they make sure that 'set_final_options()' has been called, but isn't
called redundantly.
Changed Distribution to call 'ensure_ready()' where it used to call
'set_final_options()', and in a few extra places as well.
Lots of comment/docstring revisions and additions in both classes.
New one-liner utility methods in Command: 'find_peer()', 'spawn()'.
'alias_options' table and getting rid of some hairy code in the
Distribution constructor.
Resurrected the distribution options that describe the modules present
in the module distribution ('py_modules', 'ext_modules'), and added
a bunch more: 'packages', 'package_dir', 'ext_package', 'include_dirs',
'install_path'.
Updated some comments.
Added 'warn()' method to Command.
'Command.get_command_name()' now stores generated command name in
self.command_name.
Added global cache PATH_CREATED used by 'mkpath()' to ensure it doesn't
try to create the same path more than once in a session (and, more
importantly, to ensure that it doesn't print "creating X" more than
once for each X per session!).
distributions their own directory (and .pth file).
Overhauled how we determine installation directories in
'set_final_options()' to separate platform-dependence and take
'install_path' option into account.
Added 'create_path_file()' to create path config file when 'install_path'
given.
Only run 'install_py' and 'install_ext' when, respectively, there are
some pure Python modules and some extension modules in the distribution.
- rename 'dir' to 'build_dir'
- take 'package' from distribution option 'ext_package'
- take 'extensions' from distribution option 'ext_modules'
- take 'include_dirs' from distribution
Name keyword args explictly when calling CCompiler methods.
Overhauled how we generate extension filenames (in 'extension_filename()
and 'build_extension()') to take 'package' option into account.
Changed those two methods to only compile/link if necessary (according
to simplistic timestamp checks).
Added 'output_dir' to 'object_filenames()' and 'shared_object_filename()'.
attributes, etc. Biggest change was to the Distribution constructor
-- it now looks for an 'options' attribute, which contains values
(options) that are explicitly farmed out to the commands. Also,
certain options supplied to Distribution (ie. in the 'setup()' call in
setup.py) are now "command option aliases", meaning they are dropped
right into a certain command rather than being distribution options.
This is handled by a new Distribution class attribute,
'alias_options'.
Various comment changes to reflect the new way-of-thinking.
Added 'get_command_name()' method to Command -- was assuming its
existence all along as 'command_name()', so changed the code that
needs it to call 'get_command_name()'.
now provided (minus the leading underscore) by the ccompiler module.
Fix 'compile()' to return the list of object files generated.
Cosmetic tweaks/delete cruft.
Added big comment about the kludginess of passing 'build_options'
to the link methods and how to fix it.
Added 'gen_preprocess_options()' and 'gen_lib_options()' convenience
functions -- the two cases are very similar for Unix C Compilers and
VC++, so I figured I might as well unify the implementations.
- fix some broken abstract methods
- kludge: add 'build_info' parameter to link methods
- add 'object_name()' and 'shared_library_name()'
- support for MSVCCompiler class on NT/Win95
Added 'verbose' and 'dry_run' parameters to constructor.
Changed 'compile()', 'link_*()' to default lists arguments to None
rather than empty list.
Added implementations of the filename-mangling methods mandated by
the CCompiler interface.
'new_compiler()' factory function.
Added 'runtime_library_dirs' list (for -R linker option) and methods
to manipulate it.
Deleted some obsolete comments.
Added all the filename manglign methods: 'object_filenames()',
'shared_object_filename()', 'library_filename()',
'shared_library_filename()'.
Added 'spawn()' method (front end to the "real" spawn).
- did away with 'comment_re' option -- it's just not that simple anymore
- heavily revised the main logic in 'readline()' to accomodate this
Beefed up 'warn()': 'line' can be list or tuple, and 'msg' is
automatically converted to a string.
'install_site_lib' and install_site_platlib' on non-POSIX platforms.
Should at least work for NT, as this is adopted from Amos Latteier's NT
patches. Also added extensive comments bitching about the inadequacy of
the current model, both under POSIX and NT (and probably other) systems.
'run_command()' to refer to it before attempting to run a command --
that way, command classes can freely invoke other commands without fear
of duplicate execution.
Beefed up some comments and docstrings.
meaningful return values: respectively, whether the copy was done, and
the list of files that were copied. This meant some trivial changes in
core.py as well: the Command methods that mirror 'copy_file()' and
'copy_tree()' have to pass on their return values.
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.
and dry-run flags consistently painless): 'execute()', 'mkpath()',
'copy_file()', 'copy_tree()', 'make_file()', and stub for 'make_files()'
(not sure yet if it's useful).
that wrap them in the Command class).
Fixed 'copy_file()' to use '_copy_file_contents()', not 'copyfile()'
from shutil module -- no reference to shutil anymore.
Added "not copying" announcement in 'copy_file()'.
Wee comment fix.