67 Commits

Author SHA1 Message Date
Andrew M. Kuchling
4e48224907 Backport rev. 1.73: Translate spaces in the machine name to underscores 2003-02-26 22:26:03 +00:00
Neal Norwitz
0299b1c99f SF bug #574235, convert_path fails with empty pathname 2002-08-13 17:49:18 +00:00
Fred Drake
b94b849d65 Whitespace normalization. 2001-12-06 20:51:35 +00:00
Andrew M. Kuchling
5a3e4cb0a2 Patch #429442 from Jason Tishler: Corrects sys.platform and
distutils.util.get_platform() problems caused by the cruft contained
    in Cygwin's uname -s.
2001-07-20 19:29:04 +00:00
Andrew M. Kuchling
88b0884787 Change rfc822_escape() to ensure there's a consistent amount of whitespace
after each newline, instead of just blindly inserting a space at
   the start of each line.  (Improvement suggested by Thomas Wouters)
2001-03-23 17:30:26 +00:00
Andrew M. Kuchling
df66df0a28 Patch #407434: add rfc822_escape utility function 2001-03-22 03:03:41 +00:00
Andrew M. Kuchling
83c158fdc9 Bug #229280: remove '/' characters from the OS name (for BSD/OS :) ) 2001-02-27 19:25:42 +00:00
Andrew M. Kuchling
9767e76808 Patch #404275: generate a reasonable platform string for AIX 2001-02-27 18:48:00 +00:00
Jack Jansen
b4cd5c1a3a Remove single "." components from pathnames, and return os.curdir if
the resulting path is empty.
2001-01-28 12:23:32 +00:00
Jeremy Hylton
5e2d0764cd In subst_vars(), change the name of the argument from str to s to
prevent binding for str from masking use of builtin str in nested
function.

(This is the only case I found in the standard library where a local
shadows a global or builtin.  There may be others, but the regression
test doesn't catch them.)
2001-01-25 20:10:32 +00:00
Andrew M. Kuchling
989835c9fc Patch #103220 from Jason Tishler:
This patch adds support for Cygwin to util.get_platform(). A Cygwin
  specific case is needed due to the format of Cygwin's uname command,
  which contains '/' characters.
2001-01-19 16:26:12 +00:00
Greg Ward
047c3723d0 Removed debugging code at bottom. 2000-10-14 04:07:39 +00:00
Greg Ward
9216cfe7ba Added a long-winded comment (and commented-out comment to go with out)
about how it would be nice to write absolute paths to the temporary
byte-compilation script, but this doesn't work because it screws up the
trailing-slash trickery done to 'prefix' in build_py's 'byte_compile()'
method.

Fixed to use 'execute()' instead of 'os.remove()' to remove the temporary
script: now it doesn't blow up in dry-run mode!
2000-10-03 03:31:05 +00:00
Greg Ward
04cc88df05 Remove the temporary byte-compilation script when we're done with it. 2000-10-02 02:09:55 +00:00
Greg Ward
f217e2124a Tweaked 'byte_compile()' so it silently skips non-Python files, rather than
blowing up.
2000-10-01 23:49:30 +00:00
Greg Ward
1297b5ce67 Added 'byte_compile(): an all-singing, all-dancing wrapper around the
standard 'py_compile.compile()' function.  Laundry list of features:
  - handles standard Distutils 'force', 'verbose', 'dry_run' flags
  - handles various levels of optimization: can compile directly in
    this interpreter process, or write a temporary script that is
    then executed by a new interpreter with the appropriate flags
  - can rewrite the source filename by stripping an optional prefix
    and preprending an optional base dir.
2000-09-30 20:37:56 +00:00
Greg Ward
4752769d08 Various docstring tweaks.
Fixed 'subst_vars()' so it actually blows up like the docstring claims
  (and fixed the docstring not to claim it handles ${var}, which it
  doesn't).
2000-09-30 18:49:14 +00:00
Greg Ward
b8b263b92f Reformat docstrings. 2000-09-30 18:40:42 +00:00
Greg Ward
ec84c21ce2 In 'get_platform()', handle so-called POSIX systems that don't have
'uname()' -- specifically NeXTSTEP.
2000-09-30 17:09:39 +00:00
Greg Ward
be86bdea73 Standardize whitespace in function calls. 2000-09-26 01:56:15 +00:00
Greg Ward
817dc098ef Added 'strtobool()' function: convert strings like "yes", "1",
"no", "0", etc. to true/false.
2000-09-25 01:25:06 +00:00
Greg Ward
7ec053544c Fix 'convert_path()' so it returns immediately under Unix -- prevents blowing
up when the pathname starts with '/', which is needed when converting
installation directories in the "install" command.
2000-09-22 01:05:43 +00:00
Greg Ward
f5855746fe Corran Webster: fix 'change_root()' to handle Mac OS paths. 2000-09-21 01:23:35 +00:00
Greg Ward
59399bb303 Revamped 'get_platform()' to try and do something reasonably smart on
POSIX platforms, ie. get a little more detail than 'sys.platform' gives.
2000-09-15 01:16:14 +00:00
Greg Ward
2b042ded19 Fix so 'split_quoted()' handles any whitespace delimiter (not just space). 2000-08-08 14:38:13 +00:00