summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
Commit message (Collapse)AuthorAgeFilesLines
* Factored out code for extracting-or-creating one of the optionGreg Ward2000-05-261-13/+20
| | | | | | | | | | dictionaries in 'self.command_options' to 'get_option_dict()'. Simplified code in 'parse_config_files()' and 'parse_command_line()' accordingly. Fixed code in constructor that processes the 'options' dictionary from the setup script so it actually works: uses the new 'self.command_options' dictionary rather than creating command objects and calling 'set_option()' on them.
* Added the DEBUG global (set from the DISTUTILS_DEBUG environment variable).Greg Ward2000-05-261-6/+19
| | | | | Changed the exception-handling code in 'setup()' to re-raise exceptions if DEBUG is true.
* Fixed a couple of long-hidden bugs (amazing what you find when youGreg Ward2000-05-261-6/+33
| | | | | | | | | | | attempt to verify the bold assertions in the documentation): * entries for the "root package" in 'package_dir' didn't work -- fixed by improving the fall-through code in 'get_package_dir()' * __init__.py files weren't installed when modules-in-packages were listed individually (ie. in 'py_modules' in the setup script); fixed by making 'check_package()' return the name of the __init__ file if it exists, and making 'find_modules()' add an entry to the module list for __init__ if applicable
* Take the basename of the script before concatenating it with the build dir.Greg Ward2000-05-251-1/+1
|
* Fix to use 'change_root()' rather than directly mangling path.Greg Ward2000-05-251-1/+2
|
* Improvements to Bastian's build_scripts command:Greg Ward2000-05-251-31/+58
| | | | | | | | | * 'first_line_re' loosened up * command description improved * replaced '_copy_files()' and '_adjust_files()' with one method that does everything, 'copy_scripts()' -- this should be more efficient than Bastian's version, should behave better in dry-run mode, and does timestamp dependency-checking
* Added comment to remind us of the (temporary?) obsolescense of theGreg Ward2000-05-251-0/+5
| | | | 'install_misc' class.
* Use Distribution's 'has_scripts()' method instead of directly accessingGreg Ward2000-05-251-1/+1
| | | | its 'scripts' attribute.
* Bastian Kleineidam: the "build_scripts" command.Greg Ward2000-05-251-0/+71
|
* Bastian Kleineidam: the "build_scripts" command and changesGreg Ward2000-05-254-11/+74
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Normalized all the end-of-class lines.Greg Ward2000-05-258-6/+10
|
* Catch failure to open installed Makefile, and report it as aGreg Ward2000-05-231-1/+11
| | | | | | DistutilsPlatformError: "invalid Python installation". (This will happen on Red Hat-ish systems where the python-devel package is not installed.)
* Fix 'get_command_obj()' so it checks if a command object has an attributeGreg Ward2000-05-231-0/+4
| | | | before setting it -- this will catch bad options (eg. typos) in config files.
* Added some debuging output (actually moved here from dist.py) --Greg Ward2000-05-231-0/+8
| | | | | dump the Distribution's 'command_options' dict after parsing config files, and then after parsing the command line.
* Don't take advantage of OptionDummy's new "auto-initialization" featureGreg Ward2000-05-231-1/+1
| | | | after all -- turns out it doesn't buy us much after all...
* Fixed so options from config files and command lines actually work:Greg Ward2000-05-231-7/+27
| | | | | | | | | | * 'get_command_obj()' now sets command attributes based on the 'command_options' dictionary * some typos fixed * kludged 'parse_config_files()' to re-initialize the ConfigParser instance after each file, so we know for sure which config file each option comes form * added lots of handy debugging output
* Fixed command description.Greg Ward2000-05-231-1/+1
|
* Use 'get_command_obj()' instead of 'find_command_obj()'.Greg Ward2000-05-232-4/+4
|
* OptionDummy now has a constructor that takes a list of options: each stringGreg Ward2000-05-231-2/+9
| | | | | in the option list is an attribute of the OptionDummy that will be initialized to None.
* Tweaked usage message.Greg Ward2000-05-231-2/+2
|
* Marching towards full support of config files: thoroughly overhauled theGreg Ward2000-05-231-209/+238
| | | | | | | | | | | | | | | | | | command-line parsing code, splitting it up into several methods (new methods: '_parse_command_opts()', '_show_help()') and making it put options into the 'command_options' dictionary rather than instantiating command objects and putting them there. Lots of other little changes: * merged 'find_command_class()' and 'create_command_obj()' and called the result 'get_command_class()' * renamed 'find_command_obj()' to 'get_command_obj()', and added command object creation and maintenance of the command object cache to its responsibilities (taken over from 'create_command_obj()') * parse config files one-at-a-time, so we can keep track of the filename for later error reporting * tweaked some help messages * fixed up many obsolete comments and docstrings
* Tweaked output of 'copy_file()': if copying to a new name, show the wholeGreg Ward2000-05-201-3/+6
| | | | destination path, otherwise show just the directory.
* Changed the semantics of the 'sub_commands' list: instead of functionGreg Ward2000-05-201-21/+44
| | | | | | | | | objects, it now has method names. Added three methods, 'has_lib()', 'has_scripts()', and 'has_data()' to determine if we need to run each of the three possible sub-commands. Added 'get_sub_commands()' to take care of finding the methods named in 'sub_commands', running them, and interpreting the results to build a list of sub-commands that actually have to be run.
* Check if the claimed build directory doesn't exist, and warn that we don'tGreg Ward2000-05-201-1/+6
| | | | | have any Python modules to install (rather than bomb when we try to copy a non-existent directory).
* Added 'has_scripts()', 'has_data_files()' methods.Greg Ward2000-05-201-0/+6
|
* Added missing import.Greg Ward2000-05-201-0/+1
|
* Lyle Johnson: added stubs for the four miscellaneous methods that must beGreg Ward2000-05-201-0/+27
| | | | implemented by subclasses, since they are needed by 'gen_lib_options()'.
* Added support for the 'export_symbols' parameter to 'link_shared_object()'Greg Ward2000-05-203-3/+22
| | | | | | and 'link_shared_lib()'. In MSVCCompiler, this is meaningful: it adds /EXPORT: options to the linker command line. In UnixCCompiler, it is ignored.
* Changed default developer name.Gregory P. Smith2000-05-131-1/+6
| | | | Added some guiding comments.
* Template for writing Distutils command modules.Gregory P. Smith2000-05-131-0/+39
|
* Contribution from Harry Henry Gebel: the 'bdist_rpm' command.Gregory P. Smith2000-05-131-0/+390
| | | | | (Completely uninspected and untested by me, this is just to get the code into CVS!)
* In 'install_misc': 'self.outfiles' defaults to the empty list, so we don'tGregory P. Smith2000-05-131-1/+1
| | | | have to worry about "or []" in 'get_outputs()'.
* List data files are listed in the Distribution attribute 'data_files',Gregory P. Smith2000-05-132-3/+3
| | | | rather than 'data'.
* Added the 'bdist_base' option, the base temp directory for all bdist commands.Gregory P. Smith2000-05-131-2/+13
|
* Added 'get_inputs()' methods, needed by the "install" command'sGregory P. Smith2000-05-132-0/+6
| | | | 'get_inputs()'.
* Drastically simplified by taking advantage of the "install" command'sGregory P. Smith2000-05-131-74/+21
| | | | | | | | | | new flexibility, specifically the 'root' option. Now, we just use "install" to do a fake installation into a temporary directory (the 'bdist_dir' option, which derives from the 'bdist_base' option of "bdist"), and then tar/zip up that directory. This means that dumb built distributions are now relative to the root directory, rather than the prefix or exec-prefix; this is probably a feature, but does make them slightly less flexible.
* Rename 'build_bdist' to 'bdist_base', and get it by default from theGregory P. Smith2000-05-131-6/+7
| | | | "bdist" command rather than "build".
* Typo fix.Gregory P. Smith2000-05-131-1/+1
|
* Made the '--record' option take an argument, which is the name of theGregory P. Smith2000-05-131-4/+5
| | | | file to write the list of installed files to.
* Ditch the explicit search for *.py[co] files -- they're now included inGregory P. Smith2000-05-131-6/+1
| | | | | the list returned by 'get_outputs()', thanks to changes in the "install_lib" command.
* Added '_bytecode_filenames()' method, and use it in 'get_outputs()'Gregory P. Smith2000-05-131-4/+13
| | | | | to ensure that compiled bytecode files are considered part of the output of the "install_lib" command.
* Moved check for installation to non-sys.path location so it comesGregory P. Smith2000-05-131-9/+9
| | | | | last (after writing list of installed files) -- that way, the warning is more visible.
* Harry Henry Gebel: add the "--record" option to write the list ofGregory P. Smith2000-05-131-1/+21
| | | | installed files to INSTALLED_FILES.
* Added the 'build_bdist' option and code to clean it up -- this is theGregory P. Smith2000-05-131-3/+14
| | | | | | top-level temporary directory for creating built distributions. (Won't work yet, since the "build" command doesn't yet have a 'build_bdist' option, and none of the "bdist" commands support it yet.)
* Harry Henry Gebel: get extra compiler flags from the CFLAGS environmentGregory P. Smith2000-05-131-0/+8
| | | | | | | variable. (Is this really needed? Can we drop it when the config file mechanism allows users to set compiler flags in setup.cfg?)
* Harry Henry Gebel: add support for the 'bdist_rpm' command, specificallyGregory P. Smith2000-05-131-2/+7
| | | | the 'no_format_option' class attribute.
* Harry Henry Gebel: add 'bdist_rpm' command.Gregory P. Smith2000-05-131-0/+1
|
* From Lyle Johnson: renamed 'implib_dir' to 'implib_file', andGregory P. Smith2000-05-131-7/+5
| | | | correctly ensure that it's 'dirname' exists.
* Added comment/docstring/revision header.Gregory P. Smith2000-05-122-0/+18
|
* Fixed 'select_scheme()' so it doesn't override a directory attribute that'sGregory P. Smith2000-05-121-1/+3
| | | | already been set (eg. by a command-line option).