Commit Graph

2447 Commits

Author SHA1 Message Date
Greg Ward 7d51034eef Removed some old test code: don't set 'plat' when calling 'new_compiler()'. 2000-03-31 04:37:40 +00:00
Greg Ward 95c0b269de Don't perpetrate the "_d" hack for naming debugging extensions -- that's
now done in the 'build_ext' command.
2000-03-31 03:52:16 +00:00
Greg Ward 842296480e Patch (mostly) from Thomas Heller for building on Windows:
* build to "Debug" or "Release" temp directory
  * put linker turds (.lib and .exp files) in the build temp directory
  * tack on "_d" to extensions built with debugging
  * added 'get_ext_libname()' help in putting linker turds to temp dir
Also, moved the code that simplifies None to empty list for a bunch
  of options to 'finalize_options()' instead of 'run()'.
2000-03-31 03:50:23 +00:00
Greg Ward 6e8ee5d8e9 Don't put Python's library directory into the library search path -- that's
specific to building Python extensions.
2000-03-31 03:34:09 +00:00
Greg Ward 6148c2cfa6 Added 'bdist' and 'bdist_dumb'. 2000-03-31 03:14:51 +00:00
Guido van Rossum 42405a5d7d A version of FixTk.py that works with the way the installer now
installs Tcl/Tk.
2000-03-31 03:11:40 +00:00
Greg Ward 1b64a7e4a5 Added 'get_name()' and 'get_full_name()' methods to Distribution.
Simplified 'Command.get_peer_option()' a tad -- just call 'find_peer()'
  to get the peer command object.
Updated 'Command.copy_file()' to take a 'link' parameter, just like
  'util.copy_file()' does now.
Added 'Command.make_archive()' to wrap 'util.make_archive()'.
2000-03-31 03:05:18 +00:00
Greg Ward 32ce329ce4 Added 'create_tree()'.
Changes to 'copy_file()':
  * added support for making hard links and symlinks
  * noted that it silently clobbers existing files when copying, but
    blows up if destination exists when linking -- hmmm...
  * error message tweak
Added 'base_name' parameter to 'make_tarball()' and 'make_zipfile()'.
Added 'make_archive()' -- wrapper around 'make_tarball()' or
  'make_zipfile()' to take care of the archive "root directory".
2000-03-31 03:02:22 +00:00
Greg Ward 318a9d7aa2 Added DistutilsInternalError. 2000-03-31 02:57:31 +00:00
Greg Ward e1664bdc59 The 'bdist_dumb' command, the first worker bee for use by 'bdist'. This is
the command that actually creates "dumb" binary distributions, ie.
tarballs and zip files that you just unpack under <prefix> or <exec-prefix>.
Very limited, but it's a start.
2000-03-31 02:56:34 +00:00
Greg Ward 0f77f9569c The 'bdist' command, for creating "built" (binary) distributions.
Initial revision is pretty limited; it only knows how to generate "dumb"
binary distributions, i.e. a tarball on Unix and a zip file on Windows.
Also, due to limitations in the installation code, it only knows how to
distribute Python library code.  But hey, it's a start.
2000-03-31 02:55:12 +00:00
Greg Ward 1aab6e9645 Added 'get_inputs()'. 2000-03-31 02:53:07 +00:00
Greg Ward ba38d12063 Fixed 'get_outputs()' so it actually works.
Added 'get_inputs()' (which is strikingly similar to 'get_outputs()' - sigh).
Cosmetic tweaks.
2000-03-31 02:52:02 +00:00
Greg Ward 578c10d9a5 Changed to use the new 'has_pure_modules()' and 'has_ext_modules()' methods
provided by Distribution.
Cosmetic and error message tweaks.
Simplified 'make_release_tree()':
  * extracted 'distutils.util.create_tree()'
  * don't have to do hard-linking ourselves -- it's now handled by
    'distutils.util.copy_file()' (although the detection of
    whether hard linking is available still needs to be factored out)
Removed 'make_tarball()' and 'make_zipfile()' entirely -- their role
  is now amply filled by 'distutils.util.make_archive()'.
Simplified 'make_distribution()':
  * use Distribution's new 'get_full_name()' method
  * use 'make_archive()' instead of if/elif/.../else on the archive format
2000-03-31 02:50:04 +00:00
Guido van Rossum 706dbd03bd Mark Hammond: Ooops - even though Win32 handles the same args, there
was a superfluous check for the platform.
2000-03-31 01:20:33 +00:00
Guido van Rossum 767e775a98 Improved test, by Mark Hammond, for Win32. 2000-03-31 01:09:14 +00:00
Jeremy Hylton 6a973c7118 robustify UserList constructor -- will now accept any sequence
add test cases for non-UserList class, tuple, & string
2000-03-31 00:17:46 +00:00
Jeremy Hylton 074c3e62d1 Two fixes for extended call syntax:
If a non-tuple sequence is passed as the *arg, convert it to a tuple
before checking its length.
If named keyword arguments are used in combination with **kwargs, make
a copy of kwargs before inserting the new keys.
2000-03-30 23:55:31 +00:00
Guido van Rossum 2ab9082a07 Show Tcl/Tk version number in _test() and show Unicode test if possible. 2000-03-30 23:19:44 +00:00
Andrew M. Kuchling a35be2f412 Output for simple test case for mmap on Unix; someone needs to write a
Win32 test case.
2000-03-30 21:15:46 +00:00
Andrew M. Kuchling e81b9cfcfe Added simple test case for mmap on Unix; someone needs to write a
Win32 test case
2000-03-30 21:15:29 +00:00
Greg Ward 71d55835b3 Oops: 'build_extensions()' no longer takes an 'extensions' list. 2000-03-30 19:47:22 +00:00
Guido van Rossum d30dedca27 Michael Hudson: With the (cool!) new call syntax, the longest opcode
name is much longer, which fouls up dis's formatting slightly; this is
a "fix" for that.
2000-03-30 15:02:11 +00:00
Guido van Rossum bf45322b3d Lawrence Kesteloot noted: Lib/user.py has a comment that says that the
script pointed to by PYTHONPATH will be executed on startup.  That
should say PYTHONSTARTUP.
2000-03-30 15:00:33 +00:00
Greg Ward 1d16a9f040 Put the Python "system" include dir last, rather than first. 2000-03-29 04:13:49 +00:00
Greg Ward 41b4dd66c8 Call 'find_exe()', not '_find_exe()'. 2000-03-29 04:13:00 +00:00
Greg Ward ed8a0e0f21 Patch inspired by Bastian Kleineidam <calvin@cs.uni-sb.de>:
use global __debug__ flag to determine if compiled files will be ".pyc"
or ".pyo".  Tweaked compilation output messages too.
2000-03-29 03:29:34 +00:00
Greg Ward 044b7c15c9 Changed 'copy_tree()' so it returns the list of all files that were copied or
might have been copied, regardless of the 'update' flag.
2000-03-29 03:27:45 +00:00
Greg Ward 739d06689d Documented Bastian's patch.
Made handling OSError in 'mkpath()' more standard.
2000-03-29 02:56:34 +00:00
Greg Ward da4d1aef4e Patch from Bastian Kleineidam <calvin@cs.uni-sb.de>:
make 'mkdir()' return list of directories created.
2000-03-29 02:53:02 +00:00
Greg Ward 7c1a6d4777 Added 'make_tarball()' and 'make_zipfile()' functions in preparation
for the 'bdist_dumb' command.  Adapted, with tweakage, from the 'sdist'
command.
2000-03-29 02:48:40 +00:00
Greg Ward 03d1ae1f01 Moved the guts of 'make_tarball()' and 'make_zipfile()' to distutils.util
in preparation for the 'bdist_dumb' command; these methods remain as
trivial wrappers around the versions in distutils.util.
2000-03-29 02:47:29 +00:00
Greg Ward f00c34da1d Added the "distribution query" methods: 'has_pure_modules()',
'has_ext_modules()', 'has_c_libraries()', 'has_modules()', and 'is_pure()'.
2000-03-29 02:20:45 +00:00
Greg Ward ab9d08ce65 Added 'build_clib'; replaced 'install_py' and 'install_ext' with 'install_lib'. 2000-03-29 02:18:39 +00:00
Greg Ward e5dfba5e0f Be sure to run both 'build_py' and 'build_ext', now that this command
is responsible for installing all Python modules (pure and extensions).
Added 'get_outputs()' in preparation for the 'bdist' command, and
  '_mutate_outputs()' to support 'get_outputs()'.
2000-03-29 02:17:42 +00:00
Greg Ward ee94c57fe9 Changed so the sub-commands we rely on to do the real work is specified
in a class attribute 'sub_commands', rather than hard-coded in 'run()'.
  This should make it easier to subclass 'install', and also makes it
  easier to keep 'run()' and the new 'get_outputs()' consistent.
Added 'get_outputs()' in preparation for the 'bdist' command.
2000-03-29 02:15:57 +00:00
Greg Ward ae45b16157 Use the new 'has_pure_modules()', 'has_ext_modules()', 'has_c_libraries()'
methods of Distribution instead of grovelling directly in self.distribution.
2000-03-29 02:14:21 +00:00
Greg Ward 4d16e0ac20 Added 'get_outputs()' in prepartion for the 'bdist' command.
Changed signature of 'build_extensions()': no longer takes the extension
  list, but uses 'self.extensions' (just like 'get_outputs()' has to)
Moved call to 'check_extensions_list()' from 'run()' to 'build_extensions()',
  again for consistency with 'get_outputs()'.
2000-03-29 02:13:09 +00:00
Greg Ward 8b2e95edd6 Deleted some crufty comments and code.
A host of improvements in preparation for the 'bdist' command:
  - added 'get_outputs()' method (all the other improvements were to support
    this addition)
  - made 'find_package_modules()' and 'find_modules()' return similar
    values (list of (package, module, module_filename) tuples)
  - factored 'find_all_modules()' out of 'get_source_files()' (needed
    by 'get_outputs()')
  - factored 'get_module_outfile()' out of 'build_module()' (also needed
    by 'get_outputs()')
  - various little tweaks, improvements, comment/doc updates
2000-03-29 02:10:51 +00:00
Jeremy Hylton 003663d783 fix previous checkin 2000-03-28 23:53:22 +00:00
Jeremy Hylton aed0d8deb0 add test cases for Greg Ewing's extended call syntax patch 2000-03-28 23:51:17 +00:00
Jeremy Hylton 7690151c7e slightly modified version of Greg Ewing's extended call syntax patch
executive summary:
Instead of typing 'apply(f, args, kwargs)' you can type 'f(*arg, **kwargs)'.
Some file-by-file details follow.

Grammar/Grammar:
    simplify varargslist, replacing '*' '*' with '**'
    add * & ** options to arglist

Include/opcode.h & Lib/dis.py:
    define three new opcodes
        CALL_FUNCTION_VAR
        CALL_FUNCTION_KW
        CALL_FUNCTION_VAR_KW

Python/ceval.c:
    extend TypeError "keyword parameter redefined" message to include
        the name of the offending keyword
    reindent CALL_FUNCTION using four spaces
    add handling of sequences and dictionaries using extend calls
    fix function import_from to use PyErr_Format
2000-03-28 23:49:17 +00:00
Guido van Rossum 93a7c0fe6b Fredrik Lundh:
This fixes a bunch of socket.connect(host, post) calls.  Note that I
haven't tested all modules -- I don't have enough servers here...
2000-03-28 21:45:46 +00:00
Guido van Rossum 1916b35f58 Fredrik Lundh:
The new filecmp module has an optional argument called use_statcache
which is documented as a true/false value, but used as an tuple index.

This patches replaces the tuple stuff with a good old if- statement,
and also removes a few other tuple pack/unpack constructs (if not
else, this saves a few bytes in the PYC file, and a few microseconds
when using the module ;-).
2000-03-28 21:42:38 +00:00
Guido van Rossum de59855da6 Mark Hammond: test suite for new winreg module. 2000-03-28 20:36:51 +00:00
Guido van Rossum 24bdb0474f Marc-Andre Lemburg:
The attached patch set includes a workaround to get Python with
Unicode compile on BSDI 4.x (courtesy Thomas Wouters; the cause
is a bug in the BSDI wchar.h header file) and Python interfaces
for the MBCS codec donated by Mark Hammond.

Also included are some minor corrections w/r to the docs of
the new "es" and "es#" parser markers (use PyMem_Free() instead
of free(); thanks to Mark Hammond for finding these).

The unicodedata tests are now in a separate file
(test_unicodedata.py) to avoid problems if the module cannot
be found.
2000-03-28 20:29:59 +00:00
Guido van Rossum 66d4513975 Piers Lauder:
This patch fixes the "search" command in imaplib. The problem
was that a search can take multiple arguments, but as defined,
would only accept one.

I have also made changes to the test code at the end to be less
verbose by default, but to accept a verbosity argument.
2000-03-28 20:20:53 +00:00
Guido van Rossum 1abd82c07d MBCS codecs for Windows. Contributed by Mark Hammond. 2000-03-28 01:58:50 +00:00
Guido van Rossum dc8b7980e0 Skip Montanaro:
The robotparser.py module currently lives in Tools/webchecker.  In
preparation for its migration to Lib, I made the following changes:

    * renamed the test() function _test
    * corrected the URLs in _test() so they refer to actual documents
    * added an "if __name__ == '__main__'" catcher to invoke _test()
      when run as a main program
    * added doc strings for the two main methods, parse and can_fetch
    * replaced usage of regsub and regex with corresponding re code
2000-03-27 19:29:31 +00:00
Greg Ward 89489fa15d Beefed up error-handling in 'setup()' a smidge:
handle OSError and DistutilsExecError now.
2000-03-26 21:48:43 +00:00