Commit Graph

2322 Commits

Author SHA1 Message Date
Greg Ward 60f64330d1 If the "build_lib" command built any C libraries, link with them all
when building extensions (uses build_lib's 'get_library_names()' method).
Ensure that the relative structure of source filenames is preserved in
  the temporary build tree, eg. foo/bar.c compiles to
  build/temp.<plat>/foo/bar.o.
2000-03-02 01:32:21 +00:00
Greg Ward 833dfd52e5 Added command description.
Added 'build_clib' and 'build_temp' options (where to put C libraries
  and where to put temporary compiler by-products, ie. object files).
Moved the call to 'check_library_list()' from 'run()' to 'finalize_options()'
  -- that way, if we're going to crash we do so earlier, and we guarantee
  that the library list is valid before we do anything (not just run).
Disallow directory separators in library names -- the compiled library
  always goes right in 'build_clib'.
Added 'get_library_names()', so the "build_ext" command knows what
  libraries to link every extension with.
2000-03-02 01:27:36 +00:00
Greg Ward 49ffce173e In the 'compile()' method: preserve the directory portion of source
filenames when constructing object filenames, even if output_dir given --
eg. "foo/bar.c" will compile to "foo/bar.o" without an output_dir, and to
"temp/foo/bar.o" if output_dir is "temp".
2000-03-02 01:21:54 +00:00
Greg Ward f1146572dd In compile/link methods: ensure that the directory we expect to be writing to
exists before calling the compiler/linker.
2000-03-01 14:43:49 +00:00
Greg Ward 013f0c8636 Added 'mkpath()' method: convenience wrapper around 'util.mkpath()' that adds
the compiler objects 'verbose' and 'dry_run' flags.
2000-03-01 14:43:12 +00:00
Greg Ward 611850bbb3 Added call to 'ensure_ready()' on the command object in
'Distribution.find_command_obj()'.
2000-03-01 14:42:07 +00:00
Greg Ward 585df89f60 Added 'get_platform()' to construct a string that identifies the current
platform, using 'os.uname()' or 'sys.platform'.
2000-03-01 14:40:15 +00:00
Greg Ward e51d69efb0 Build reorg:
* 'build_dir' -> 'build_lib', which by default takes its value
    straight from 'build_lib' in the 'build' command
  * added 'build_temp' and 'inplace' options
  * change 'build_extensions()' to put object files (compiler turds) in
    'build_temp' dir
  * complicated the name-of-extension-file shenanigans in
    'build_extensions()' to support "in-place" extension building, i.e.
    put the extension right into the source tree (handy for developers)
  * added 'get_ext_fullname()', renamed 'extension_filename()' to
    'get_ext_filename()', and tweaked the latter a bit -- all to support
    the new filename shenanigans
2000-03-01 01:43:28 +00:00
Greg Ward 42a3bf564a Build reorg:
* 'build_lib' -> 'build_purelib'
  * new 'build_lib' and 'build_temp' options
  * use 'get_platform()' to initialize 'build_platlib' and 'build_temp'
2000-03-01 01:26:45 +00:00
Greg Ward e691651682 Build reorg: change 'build_dir' option to 'build_lib'. 2000-03-01 01:19:37 +00:00
Guido van Rossum a9b2b4be26 Remove some redundant logic from walk() -- there's no need to check
for "." and "..", since listdir() no longer returns those.
2000-02-29 13:31:16 +00:00
Andrew M. Kuchling 39d3bfc4c2 Fix a typo in a comment 2000-02-29 00:10:24 +00:00
Fred Drake 1ab41fc680 Fix comments relating to the specific regexs used to parse section and
option names; errors noted by Greg Stein <gstein@lyra.org>.
2000-02-28 23:23:55 +00:00
Guido van Rossum 619c33787b Patch by Piers Lauder, who writes:
This patch is re: Lucas.Dejonge@awtpl.com.au: [Python-bugs-list] imaplib -
not complying with RFC (PR#218)

Lucas de Jonge reported that the code in imaplib that detects a read-write
to read-only change doesn't comply with RFC 2060.
2000-02-28 22:37:30 +00:00
Fred Drake c517b9b406 (Finally!) Changes related to the ConfigParser/INI-file topics
discussed on c.l.py last January.  Specifically:
  - more characters allowed in section & option names
  - if '=' is used to separate the option & value, the value can be
    followed by a comment of the form '\s;'
2000-02-28 20:59:03 +00:00
Guido van Rossum 98d9fd3e68 Simple changes by Gerrit Holl - move author acknowledgements out of
docstrings into comments.
2000-02-28 15:12:25 +00:00
Guido van Rossum 84a74595f7 Patch by Gerrit Holl to avoid doing two stat() calls in a row in walk(). 2000-02-28 14:27:07 +00:00
Guido van Rossum 0ba33002e1 Fix a typo in Barry's checkin.
Reported both by Gerrit Holl and Mark Favas.
2000-02-27 15:35:47 +00:00
Guido van Rossum d28de23bda Fixed a multi-arg append() call, discovered by Mark Favas.
Also removed some unnecessary backslases (inside parens).
2000-02-27 15:34:29 +00:00
Greg Ward 7a0620c3a5 Try to deal with pre-1.5.2 IOError exception objects. 2000-02-26 00:49:40 +00:00
Greg Ward 4f08e4facb Unfinished, untested implementation of the lovely baroque installation scheme
cooked up by Fred Drake and me.  Only saved for posterity (whoever posterity
is), as it is about to be ditched in favour of GvR's much simpler design.
2000-02-26 00:49:04 +00:00
Barry Warsaw 7d3f27c090 Changes inspired by Randall Hooper to allow callbacks when an
OptionMenu is modified.  Somewhat rewritten and elaborated by myself.

class _setit: The constructor now takes an optional argument
`callback' and stashes this in a private variable.  If set, the
__call__() method will invoke this callback after the variable's value
has changed.  It will pass the callback the value, followed by any
args passed to __call__().

class OptionMenu: The constructor now takes keyword arguments, the
only one that's legally recognized is `command', which can be set to a
callback.  This callback is invoked when the OptionMenu value is set.
Any other keyword argument throws a TclError.
2000-02-25 21:54:19 +00:00
Guido van Rossum f7221c3a7d Test case for fork1() behavior.
Only the main thread should survive in the child after a fork().
2000-02-25 19:25:05 +00:00
Guido van Rossum e6674e6fc6 Gerrit forgot to remove the "import string". 2000-02-25 16:34:11 +00:00
Fred Drake a395ced424 Gerrit Holl's patch to move attribution from the docstring to a
comment.  <gerrit@nl.linux.org>
2000-02-25 16:14:08 +00:00
Guido van Rossum 2341794667 Fix a couple broken append() calls, spotted by Tim. 2000-02-25 11:48:42 +00:00
Guido van Rossum 3af7b050a3 Fix a broken r.append(name, value) call, spotted by Tim. 2000-02-25 11:44:03 +00:00
Guido van Rossum d5062babed Moshe Zadka:
Added docstrings to tkSimpleDialog.py
2000-02-24 15:01:43 +00:00
Greg Ward 4840112121 Fix from est@hyperreal.org: missing initialize in 'find_defaults()'. 2000-02-24 03:17:43 +00:00
Guido van Rossum 9811861e3c Mark Favas discovered this: getatime() accidentally returned the MTIME!
This fixes PR#211.
2000-02-24 02:26:51 +00:00
Guido van Rossum 19ce91be92 Piers Lauder:
A change in my last patch could, under certain circumstances,
	cause a loop if the connection to the server dropped while
	waiting for a command completion. I've changed the code to
	re-raise the error after possible debugging output.
2000-02-24 02:24:50 +00:00
Andrew M. Kuchling 5ebfa2ae9f Add tests to exercise sequence operations (multiplication, indexing,
slicing) using long integers
2000-02-23 22:23:17 +00:00
Guido van Rossum dc6883365b Added tabnanny.py, by Tim Peters, formerly from Tools/scripts, to the
standard library.  Added some comments:

# XXX Note: this is now a standard library module.
# XXX The API needs to undergo changes however; the current code is too
# XXX script-like.  This will be addressed later.
2000-02-23 15:32:19 +00:00
Jeremy Hylton 772dd417f7 satisfy the tabnanny (thanks to MH for noticing the problem) 2000-02-21 22:46:00 +00:00
Greg Stein 42b9bc7a7d add TODO section 2000-02-19 13:36:23 +00:00
Greg Stein 3bb578c128 reduce fsimp coupling: provide fs_imp param to ImportManager constructor,
add clsFilesystemImporter class attribute, alter handling of suffix list
convert suffix importers to funcs rather than instances
remove backwards compat code: Importer.install and 2-tuple get_code()
  result values
2000-02-18 13:04:10 +00:00
Greg Stein d4f1d2074e shift demo importers to importers.py (destined for Demo/ ?)
switch to isinstance() rather than direct type comparisons
removing chaining concept
update ImportManager.install() to take an optional namespace to install
  itself in. this will be useful for setting up rexec environments.
minor comment nits
2000-02-18 12:03:40 +00:00
Greg Ward 18c05f240e Changed all references to command methods 'set_default_options()' and
'set_final_options()' to 'initialize_options()' and 'finalize_options()'.
2000-02-18 00:36:20 +00:00
Greg Ward e01149cbe8 Renamed 'set_default_options()' to 'initialize_options()', and
'set_final_options()' to 'finalize_options()'.
2000-02-18 00:35:22 +00:00
Greg Ward 4c96db1a65 Changed references to the command class 'options' attribute to 'user_options'.
Related docstring changes.
Unrelated comment changes.
2000-02-18 00:26:23 +00:00
Greg Ward bbeceeaf9a Renamed all 'options' class attributes to 'user_options'. 2000-02-18 00:25:39 +00:00
Greg Ward 592f28272e Command classes are now named identically to their commands, so reflect this
in 'find_command_class()' method.
2000-02-18 00:14:21 +00:00
Greg Ward 1993f9ad0e Renamed all command classes so they're exactly the same as the name of the
command itself: no more of this "FooBar class for foo_bar command"
silliness.
2000-02-18 00:13:53 +00:00
Greg Ward e1b1c94a0c Changed 'dist' to 'sdist'. 2000-02-18 00:11:52 +00:00
Greg Ward a82122b887 The 'sdist' command to create a source distribution. This is derived from the
old 'dist' command, but the code for dealing with manifests is completely
redone -- and renaming the command to 'sdist' is more symmetric with the
soon-to-exist 'bdist' command.
2000-02-17 23:56:15 +00:00
Greg Ward 3d6b023f5c The 'dist' command is dead -- long live the 'sdist' command! 2000-02-17 23:54:55 +00:00
Jeremy Hylton efd0694a2d changes to _lookupName
- removed now (happily) unused second arg
- need to verify results of [].index are correct; for building consts,
  need to have same value and same type, e.g. 2 not the same as 2L
2000-02-17 22:58:54 +00:00
Jeremy Hylton 3ec7e2c4be the previous quick hack to fix def foo((x,y)) failed on some cases
(big surprise).  new solution is a little less hackish.

Code gen adds a TupleArg instance in the argument slot. The tuple arg
includes a copy of the names that it is responsble for binding.  The
PyAssembler uses this information to calculate the correct argcount.

all fix this wacky case: del (a, ((b,), c)), d
which is the same as: del a, b, c, d
(Can't wait for Guido to tell me why.)

solution uses findOp which walks a tree to find out whether it
contains OP_ASSIGN or OP_DELETE or ...
2000-02-17 22:09:35 +00:00
Jeremy Hylton 7708d697ee add varargs and kwargs flags to Lambda nodes 2000-02-17 22:06:20 +00:00
Jeremy Hylton 873bdc18e4 satisfy the tabnanny
fix broken references to filename var in generateXXX methods
2000-02-17 17:56:29 +00:00