Commit Graph

3337 Commits

Author SHA1 Message Date
Greg Ward 8099f0e5fc Renamed --clean to --no-keep-temp and --noclean to --keep-temp. 2000-09-16 15:54:18 +00:00
Greg Ward 8429036496 Renamed --keep-tree option to --keep-temp. 2000-09-16 15:53:41 +00:00
Greg Ward 24511d2a6e Ensure sub-commands of "install" are reinitialized too.
Run "install" the right way, by calling 'run_command()'.
2000-09-16 15:30:47 +00:00
Greg Ward 47ec20757d Remove some debugging output from the last change. 2000-09-16 15:27:17 +00:00
Greg Ward ecce14522c In 'reinitialize_subcommand()', pass 'reinit_subcommands' flag on to the
real implementation in Distribution.
2000-09-16 15:25:55 +00:00
Greg Ward f449ea51aa Generalized 'reinitialize_command()' so it can optionally reinitialize
the command's sub-commands as well (off by default).  This is essential if
we want to be be able to run (eg.) "install" twice in one run, as happens
when generating multiple built distributions in one run.
2000-09-16 15:23:28 +00:00
Greg Ward b3e0ad9804 Added the "sub-command" machinery to formalize the notion of "command
families" -- eg. install and its brood, build and its brood, and so forth.
Specifically: added the 'sub_commands' class attribute (empty list, sub-
classes must override it) and a comment describing it, and the
'get_sub_commands()' method.
2000-09-16 15:09:17 +00:00
Greg Ward fadefedb89 Factored the "sub-command" machinery out to Command. Mainly, this
meant removing 'get_sub_commands()', and moving the 'sub_commands' class
attribute to the end and restructuring it to conform to the new regime.
2000-09-16 15:06:57 +00:00
Tim Peters c1d65c34cf Repair senseless random.seed docstring (reported on c.l.py). 2000-09-16 04:02:48 +00:00
Greg Ward 53db8154e6 Tweaked the build temp dir names again. 2000-09-16 02:06:45 +00:00
Greg Ward e918b6fdb5 Typo fix. 2000-09-16 01:59:06 +00:00
Greg Ward 42900941b8 Include the Python version in the platform-specific build directories:
with the recent change in 'get_platform()', we now have directory names
like "build/lib-1.5-linux-i586".  Idea and original patch by
Rene Liebscher.
2000-09-16 01:54:46 +00:00
Greg Ward 9ae7c3c9a5 Document the directory separatory for include dir and library dir lists. 2000-09-16 01:44:45 +00:00
Neil Schemenauer a53cf79275 - add a new test
- document some of the tricky tests (hopefully correctly :)
2000-09-15 22:32:29 +00:00
Jeremy Hylton afde7e24b6 fix bug #110661 (PR#356) -- accept either & or ; as separator for CGI
query string
also some doc string reformatting and use of string methods instead of
    older string.splitfields
2000-09-15 20:06:57 +00:00
Paul Prescod 5c6bd31319 Fixed some typos. Removed one obsolete comment. 2000-09-15 18:38:47 +00:00
Paul Prescod ce88db0230 Fixed bug that disallowed processing instructions before and after
document element.
2000-09-15 17:09:19 +00:00
Jeremy Hylton be467e5c69 Fix Bug #114293:
Strings are unpickled by calling eval on the string's repr. This
    change makes pickle work like cPickle; it checks if the pickled
    string is safe to eval and raises ValueError if it is not.

test suite modifications:
    Verify that pickle catches a variety of insecure string pickles
    Make test_pickle and test_cpickle use exactly the same test suite
    Add test for pickling recursive object
2000-09-15 15:14:51 +00:00
Jack Jansen 344ecdb249 Before comparing os.uname() to BeOS check that os.uname actually exists:-) 2000-09-15 12:59:46 +00:00
Jack Jansen 8b7c3c0be7 For current directory use os.curdir, not ".". 2000-09-15 12:58:08 +00:00
Jack Jansen 00ce51e38e Allow am/pm as well as AM/PM (C9X behaviour). 2000-09-15 12:57:35 +00:00
Martin v. Löwis ff1ce0f44f Support \r in source files. Closes bug #101425. 2000-09-15 06:57:26 +00:00
Fred Drake d2a5ad25d5 Removed some debugging prints: When running user configuration code
from Tk.readprofile(), do not print anything extra to stdout, just run
the code.
2000-09-15 04:41:22 +00:00
Greg Ward bbba66eb7d Added 'warn_dir' option so other code can sneak in and disable
the sometimes inappropriate warning about where we're installing data files.
2000-09-15 01:21:07 +00:00
Greg Ward 9bd3e9b6b2 Adjust to the new sysconfig regime: use 'get_config_vars()' instead
of globals from sysconfig.
Added 'prefix' and 'exec_prefix' to the list of variables that can be
  expanded in installation directories (preserving the stupid old names
  of 'sys_prefix' and 'sys_exec_prefix, though).
2000-09-15 01:20:10 +00:00
Greg Ward d602909128 Adjust to the new sysconfig regime: use 'get_config_var()' instead
of globals from sysconfig.
2000-09-15 01:19:03 +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 879f0f11ba Changed from eager parsing of Makefile (at import time) to lazy: only do
all that work when someone asks for a "configuration variable" from the
Makefile.  Details:
  - added 'get_config_vars()': responsible for calling one of the
    '_init_*()' functions to figure things out for this platform,
    and to provide an interface to the resulting dictionary
  - added 'get_config_var()' as a simple interface to the dictionary
    loaded by 'get_config_vars()'
  - changed the '_init_*()' functions so they load the global dictionary
    '_config_vars', rather than spewing their findings all over
    the module namespace
  - don't delete the '_init_*()' functions when done importing
  - adjusted 'customize_compiler()' to the new regime
2000-09-15 01:15:08 +00:00
Greg Ward 3fff8d2969 Fixed so 'parse_makefile()' uses the TextFile class to ensure that
comments are stripped and lines are joined according to the backslash
convention.
2000-09-15 00:03:13 +00:00
Jeremy Hylton 30a818196e cope with weird Content-Length values returned from servers by
ignoring them; e.g. Zope sometimes returns 13497L
2000-09-14 20:34:27 +00:00
Jeremy Hylton 7ae51bf82d Remove "," from the list of always_safe characters. It is a reserved
character according to RFC 2396. Add some text to quote doc string
that explains the quoting rules better.

This closes SF Bug #114427.

Add _fast_quote operation that uses a dictionary instead of a list
when the standard set of safe characters is used.
2000-09-14 16:59:07 +00:00
Fred Drake e108a02723 Detlef Lannert <lannert@uni-duesseldorf.de>:
mailbox.py (from the CVS tree) doesn't work with qmail Maildirs:
Filenames are completed when the directories are scanned, and
the directory name is prepended again in the next() method.

Another suggestion: Change the print statement in the _test()
driver to show two more date characters (probably the length
has increased due to the recent Y2K hype ;). Now it shows the
complete date, including the seconds -- at least for me. (I've
also made the sender field left justified, in case it is ever
shorter than the field width).
2000-09-14 14:44:43 +00:00
Greg Ward 3a0310a328 Added --force (-f) option to force installation (including bytecode
compilation).
2000-09-13 01:02:25 +00:00
Greg Ward 1830b21186 Bump version to 0.9.3pre. 2000-09-13 00:44:09 +00:00
Greg Ward d75a276026 Fix install directories on Mac OS: now everything goes to
<prefix>:Lib:site-packages.
2000-09-13 00:12:11 +00:00
Greg Ward 7ac743bd72 Bastian Kleineidam: fix so it cleans up the temporary script-building
directory too.  Also generally cleaned up the code.
2000-09-12 00:07:49 +00:00
Guido van Rossum 94bf62f9c0 Deleted ancient file. 2000-09-11 22:08:27 +00:00
Fred Drake 526a18235a Untabify. When compiling in -tt mode, an inconsistent Tab use error
was raised.  This occurred during installation.
2000-09-11 04:00:46 +00:00
Greg Ward 8fd7ba2c6a Delete some debugging prints. 2000-09-11 00:50:37 +00:00
Greg Ward 20283e5cc3 Added --plat-name option to override sysconfig.get_platform() in
generated filenames.
2000-09-11 00:47:35 +00:00
Greg Ward d0e4b42ee2 Added --python and --fix-python options for better control over what
interpreter the .spec file refers to.
Cosmetic tweaks.
2000-09-10 01:21:27 +00:00
Thomas Heller ecaf0d8b47 The installer now displays info about version of distutils
used to create the distribution and the creation date.

Takes care of the extra_path argument to the setup function,
installs the modules into <prefix>/extra_path and creates
a -pth file (like install_lib does).
2000-09-09 21:15:12 +00:00
Thomas Heller b943840a78 The windows installer must also look under the HKEY_CURRENT_USER key
for python installations, not only under HKEY_LOCAL_MACHINE.
2000-09-09 19:52:49 +00:00
Fred Drake b37bdc2c7c Do not try to fix bugs while sleeping.
Paid more attention to the comments on the report; Martin suggested just
not having a __del__() method, which makes more sense in this case.  So
I have removed it.

This closes SourceForge bug #113850.  Again.
2000-09-09 06:29:35 +00:00
Fred Drake 16c4aa441b Kevin Jacobs <jacobs@darwin.cwru.edu>:
The posixfile __del__ method attempts to close the file (_file_) it
contains. However, if the open() method fails, then _file_ is never
assigned.

This closes SourceForge bug #113850.
2000-09-09 06:26:40 +00:00
Andrew M. Kuchling da85a272a6 Match Sam Rushing's current version of asyncore.py and asynchat.py
(SF patch 101447, fixing PR#113704)
2000-09-08 20:30:39 +00:00
Fred Drake 72e48bd05f Add test cases to make sure we get the right SyntaxError message for
various illegal uses of "continue".
2000-09-08 16:32:34 +00:00
Martin v. Löwis 0d8ce6111c Fix for bug 110629: Generate unique image names by introducing a counter 2000-09-08 16:28:30 +00:00
Thomas Heller 904ca11a87 Changes:
distutils/command/bdist_wininst.py:
- the windows installer is again able to compile after installing
  the files. Note: The default has changed, the packager has to
  give --no-target-compile/--no-target-optimize to NOT compile
  on the target system. (Another note: install_lib's --compile
  --optimize options have the same semantics to switch off
  the compilation. Shouldn't the names change?)
- All references to specific python versions are gone.
- A small bug:
    raise DistutilsPlatformError ("...")
  instead of
    raise DistutilsPlatformError, ("...")
- When bdist_wininst creates an installer for one specific python
  version, this is reflected in the name:
    Distutils-0.9.2.win32-py15.exe instead of
    Distutils-0.9.2.win32.exe
- bdist_wininst, when run as script, reads the wininst.exe file
  and rewrites itself. Previously this was done by hand.

misc/install.c
- All the changes needed for compilation
- Deleted a lot of debug/dead code
2000-09-07 15:59:22 +00:00
Fredrik Lundh a249f16af0 Older Tk versions don't support mousewheel support. Set event.delta
to zero if that's the case (closes bug #113727)
2000-09-07 15:05:09 +00:00
Marc-André Lemburg f156a44e8c Added Unicode objects to the copy mechanism. Since these are immutable,
they are copied as atomic types.
2000-09-07 11:00:03 +00:00
Greg Ward 8d5b5ec513 Typo fix. 2000-09-07 02:38:42 +00:00
Guido van Rossum 00c09256d5 Removing this file again to set its status to 'dead'. 2000-09-07 02:02:56 +00:00
Greg Ward 5fad268ffc Bullet-proofing of 'make_release_tree()':
- 'mkpath()' the distribution dir in case of empty manifest
  - warn if empty manifest
  - detect, warn about, and skip non-regular files in manifest
2000-09-06 02:18:59 +00:00
Greg Ward d3b76a8fbf Reorganized logic in 'get_file_list()' so it's easier to read, and fixed a
bug to boot: now works even if both MANIFEST and MANIFEST.in don't exist.
Don't hardcode setup.py, use 'self.distribution.script_name'.
2000-09-06 02:08:24 +00:00
Greg Ward 6a2035d76b Typo fix. 2000-09-06 02:06:27 +00:00
Guido van Rossum e2ab1451cf The usual. 2000-09-05 04:49:50 +00:00
Guido van Rossum d1252395bd Add new builtin commands "copyright", "license", "credits" which
display the information you would expect them to display.
2000-09-05 04:39:55 +00:00
Guido van Rossum 1d105d15d3 For this server to work on Windows, directories should use "/" as the
separator in the href, not os.sep.

Added a <title> tag to directory listings.

Bumped version to 0.5.
2000-09-04 15:55:31 +00:00
Tim Peters 50699215f8 test_mmap wrote null bytes into its expected-output file; this caused me to
waste an hour tracking down an illusion; repaired it; writing/reading non-
printable characters (except \t\r\n) into/outof text-mode files ain't
defined x-platform, and at least some Windows text editors do surprising
things in their presence.
Also added a by-hand "build humber" to the Windows build, in an approximation
of Python's inexplicable BUILD-number Unix scheme.  I'll try to remember to
increment it each time I make a Windows installer available.  It's starting
at 2, cuz I've put 2 installers out so far (both with BUILD #0).
2000-09-04 07:34:06 +00:00
Andrew M. Kuchling 2cb176f327 Correct docstring about return value when group didn't participate in match
(pointed out by /F)
2000-09-04 03:19:48 +00:00
Guido van Rossum 1d62f492b0 Hack the Windows code to use os.popen().
The returned file is assigned to an instance variable;
otherwise the implied close hangs for a long time.
2000-09-03 17:12:50 +00:00
Fredrik Lundh 03dd010b4f updated SRE test suite (fixes PEP223 problem, shows syntax errors) 2000-09-03 10:43:16 +00:00
Tim Peters acee48628d Repair failing test_sre.py.
This was a funny one!  The test very subtly relied on 1.5.2's
behavior of treating "\x%" as "\x%", i.e. ignoring that was an
\x escape that didn't make sense.  But /F implemented PEP 223,
which causes 2.0 to raise an exception on the bad escape.
Fixed by merely making the 3 such strings of this kind into
raw strings.
2000-09-03 08:15:19 +00:00
Fredrik Lundh 510c97ba2f return -1 for undefined groups (as implemented in 1.5.2) instead of
None (as documented) from start/end/span.  closes bug #113254
2000-09-02 16:36:57 +00:00
Fredrik Lundh 143328ba63 -- tightened up parsing of octal numbers
-- improved the SRE test harness: don't use asserts, test a few more
   things (including more boundary conditions)
2000-09-02 11:03:34 +00:00
Tim Peters 17289426e2 SourceForge patch 101396, by an anonymous friend.
"sre_parse.py missing '7' in DIGITS"
2000-09-02 07:44:32 +00:00
Jeremy Hylton 92f3972090 patch by Neil Schemenauer to improve (fix?) line number generation 2000-09-01 20:47:37 +00:00
Tim Peters 3620857d60 The "more" cmd varies across Windows flavors, sometimes adding stray
newlines at the start or end.  Fiddle test_popen2 and popen2._test() to
tolerate this.  Also change all "assert"s in these tests to raise
explicit exceptions, so that python -O doesn't render them useless.
Also, in case of error, make the msg display the reprs of what we
wrote and what we read, so we can tell exactly why it's failing.
2000-09-01 20:38:55 +00:00
Jeremy Hylton 2051608616 Update magic number.
Fix import support to work with import as variant of Python 2.0.  The
grammar for import changed, requiring changes in transformer and code
generator, even to handle compilation of imports with as.
2000-09-01 20:33:26 +00:00
Guido van Rossum 6f8f92f535 Adding new files, removing some. 2000-09-01 19:27:34 +00:00
Guido van Rossum 8d691c8422 The usual 2000-09-01 19:25:51 +00:00
Barry Warsaw 3a9d0611fb Applying patch #100994 to allow JPython to use more of the standard
Python test suite.  Specifically,

- import time instead of strop in test_b1

- test for ClassType of exceptions using isinstance instead of
  equality in test_exceptions

- remove __builtins__ from dir() output in test_pkg

test_pkg output needs to be regenerated.
2000-09-01 06:53:52 +00:00
Barry Warsaw 5bf94a0b77 Applied patch #101350, closing it. 2000-09-01 06:40:07 +00:00
Barry Warsaw 100d81e8e3 Added support for RFC 959's REST command (restart), closing SF patch
#101187, which some modifications.  Specifically,

ntransfercmd(), transfercmd(), and retrbinary() all grow an optional
`rest' argument, which if not None, is used as the argument to an FTP
REST comman dbefore the socket is returned.  Differences from the SF
patch:

- always compare against None with `is' or `is not' instead of == or !=

- no parens around conditional

- RFC 959 defines the argument to REST is a string containing any
  ASCII characters in the range [33..126].  Therefore, we use the %s
  format character instead of %f or %d as suggested in the patch's
  comments.  Note that we do /not/ sanity checkthe contents of the
  rest argument (but we'll document this in the library reference
  manual).
2000-09-01 06:09:23 +00:00
Guido van Rossum 6aefd91c7f Now that StreamRequestHandler defaults rfile to buffered, make it
unbuffered (by setting the class variable rbufsize to 0), because we
(may) need to pass the file descriptor to the subprocess running the
CGI script positioned after the headers.
2000-09-01 03:27:34 +00:00
Guido van Rossum 01fed4d4e6 In class StreamRequestHandler, make the default buffering for rfile
and wfile class variables (that the instance can also override).
Change the default for rfile to buffered, because that seems to make a
big difference in performance on some platforms.

An anti-patch is needed to revert the effect in CGIHTTPServer.py which
I'll check in momentarily.
2000-09-01 03:25:14 +00:00
Tim Peters c638791d53 Repaired comment. 2000-09-01 02:20:20 +00:00
Greg Ward 1ac9802748 Rene Liebscher/Thomas Heller:
* ensure the "dist" directory exists
* raise exception if using for modules containing compiled extensions
  on a non-win32 platform.
* don't create an .ini file anymore (it was just for debugging)
2000-09-01 01:44:45 +00:00
Greg Ward cec1568625 Rene Liebscher:
* reverse library names from bcpp_library to library_bcpp
* move some code to the right places, to put the def-files
  in the right directories again
2000-09-01 01:28:33 +00:00
Greg Ward 7483d6803b Rene Liebscher: comment fixes. 2000-09-01 01:24:31 +00:00
Greg Ward 66e966f7bd Rene Liebscher: hack '_init_posix()' to handle the BeOS linker script.
(With a worry-wart comment added by me about where we *should* add the
Python library to the link.)
2000-09-01 01:23:26 +00:00
Greg Ward b3b6d395e4 Bump version to 0.9.2. 2000-09-01 01:00:40 +00:00
Greg Ward e3644e245e Added 'run_setup()' to allow outsiders to run a setup script under
fairly tight control, and the '_setup_stop_after' and '_setup_distribution'
globals to provide the tight control.

This isn't entirely reliable yet: it dies horribly with a NameError on the
example PIL setup script in examples/pil_setup.py (at least with Python
1.5.2; untested with current Python).  There's some strangeness going
on with execfile(), but I don't understand it and don't have time
to track it down right now.
2000-09-01 00:52:45 +00:00
Barry Warsaw 9a2d9d7f04 GNUTranslations._parse(): Fix portability problems on 64-bit machines
by masking all unsigned integers with 0xffffffff.
2000-08-31 23:28:52 +00:00
Fredrik Lundh 0c4fdbaee8 closes bug #112468 (and all the other bugs that surfaced when
I fixed the a bug in the regression test harness...)
2000-08-31 22:57:55 +00:00
Fred Drake 762c1cb3e3 Test case to exercise fix for error propogation bug in dictionarys. 2000-08-31 19:48:52 +00:00
Jeremy Hylton 6102e29df2 fixes bug #111951
applies patch #101369 by Moshe Zadke
use explicit list of always safe characters instead of string.letters
add test case
2000-08-31 15:48:10 +00:00
Barry Warsaw b76a55c278 GNUTranslations.BE_MAGIC: don't be so clever in calculating this from
LE_MAGIC; it breaks on Tru64.
2000-08-31 10:45:54 +00:00
Sjoerd Mullender 1c8feae411 New method getnamespace.
Since the application never gets to see the namespace abbreviation
used in the XML document, but some applications may need to know them,
we provide this method.
2000-08-31 10:27:00 +00:00
Jeremy Hylton 34bef2694f tg@freebsd.org
close SF patch #101354
2000-08-31 02:42:11 +00:00
Greg Ward 8a98cd9e25 Add /GX to 'compile_options'. This is definitely needed for C++ source;
according to the MS docs it enables exception-handling, and (according
to Alex Martelli <aleaxit@yahoo.com>) is needed to compile without
getting warnings from standard C++ library headers.  Apparently
it doesn't cause any problems with C code, so I haven't bothered
conditionalizing the use of /GX.
2000-08-31 00:31:07 +00:00
Greg Ward 408e9ae299 Add ".cxx" to the list of known C++ extensions. 2000-08-30 17:32:24 +00:00
Greg Ward 46a69b9c7f Added docstring for 'wrap()' function. 2000-08-30 17:16:27 +00:00
Skip Montanaro ad3bc44d52 patches from David Goodger. Closes patch 101085.
* deletes cache
* adds firstweekday and setfirstweekday functions that allow user to control
  which day of the week is first when displaying calendars
* adds month, week, calendar functions that return their results instead of
  printing them
* adds symbolic constants MONDAY, ..., SUNDAY so users need not remember the
  ordinal values of the weekdays
2000-08-30 14:01:28 +00:00
Barry Warsaw 64dab4602e Expand the test suite to test both the GNU gettext and translation
class-based APIs.
2000-08-30 03:32:07 +00:00
Barry Warsaw 33d8d705b8 Finalize this module for Python 2.0 based on feedback and input from
Martin von Loewis, Peter Funk, James Henstridge, Francois Pinard, and
Marc-Andre Lemburg.
2000-08-30 03:29:58 +00:00
Andrew M. Kuchling d50a1877ee Fix for two problems on FreeBSD:
In test_poll1(), unregister file descriptors as they're closed,
    and also close the read end of the pipe
In test_poll2(), make the code assume less about the combinations of flag
    bits that will be returned
2000-08-29 16:53:34 +00:00
Guido van Rossum 2d21863266 Add support for FreeBSD-[45].
-- tg@FreeBSD.org
2000-08-29 14:57:27 +00:00
Guido van Rossum e504c0c2dc Patch by tg@FreeBSD.org to try /var/tmp first.
This helps on 4.4BSD-based systems.
2000-08-29 14:55:03 +00:00