Greg Ward [Thu, 8 Jun 2000 01:06:02 +0000 (01:06 +0000)]
Moved the code that prunes the file list after reading the manifest
template into a new method 'prune_file_list()', called from
'get_file_list()' rather than 'read_manifest()' -- this keeps
'read_manifest()' more general.
Deleted the redundant call to 'exclude_pattern()' in 'make_distribution()'
-- this had the same intention as 'prune_file_list()', but was incomplete
(only pruned the release tree, not the build tree) and in the wrong
place (the prune wouldn't be reflected in the manifest file).
Greg Ward [Thu, 8 Jun 2000 00:08:14 +0000 (00:08 +0000)]
Made all debug output go through the 'debug_print()' method instead of
directly printing to stdout. This was a bit more work than it sounds like
it should have been:
* turned 'select_pattern()' and 'exclude_pattern()' from functions into
methods, so they can refer to 'self' to access the method
* commented out the *other* 'exclude_pattern()' method, which appears
to be vestigial code that was never cleaned up when the
'exclude_pattern()' function was created
* changed the one use of the old 'exclude_pattern()' method to use the
new 'exclude_pattern()' (same behaviour, slightly different args)
* some code and docstring reformatting
* and, of course, changed all the debugging prints to 'debug_print()' calls
Added/tweaked some regular ('self.announce()') output for better runtime
feedback.
Marc-Andre Lemburg <mal@lemburg.com>:
Changed the API names for setting the default encoding.
These are now in line with the other hooks API names
(no underscores).
Marc-Andre Lemburg <mal@lemburg.com>:
Change the default encoding to 'ascii' (it was previously
defined as UTF-8).
Note: The implementation still uses UTF-8 to implement
the buffer protocol, so C APIs will still see UTF-8. This
is on purpose: rather than fixing the Unicode implementation,
the C APIs should be made Unicode aware.
Marc-Andre Lemburg <mal@lemburg.com>:
Added support to set the default encoding of strings
at startup time to the values defined by the C locale.
The sys.setdefaultencoding() API is deleted after having
set up the encoding, so that user code cannot subsequentely
change the setting. This effectively means that only site.py
may alter the default setting.
Marc-Andre Lemburg <mal@lemburg.com>:
Added a new locale name aliasing engine which also supports
locale encodings, a feature which is used by the new default
encoding support in site.py.
Greg Ward [Wed, 7 Jun 2000 03:00:06 +0000 (03:00 +0000)]
Patch from Rene Liebscher: this adds "--help-foo" options to list the
values that "--foo" can take for various commands: eg. what formats for
"sdist" and "bdist", what compilers for "build_ext" and "build_clib".
I have *not* reviewed this patch; I'm checking it in as-is because it also
fixes a paper-bag-over-head bug in bdist.py, and because I won't have
time to review it properly for several days: so someone else can
test it for me, instead!
Greg Ward [Wed, 7 Jun 2000 02:29:03 +0000 (02:29 +0000)]
Always look for the system config file in the Distutils module directory,
and call it "distutils.cfg" instead of "pydistutils.cfg" (personal
config files are still ".pydistutils.cfg" or "pydistutils.cfg", though).
Greg Ward [Wed, 7 Jun 2000 02:26:19 +0000 (02:26 +0000)]
Patch from Rene Liebscher:
Look for personal config file in /home/greg on Windows, too: users will have
to set /home/greg to use this, so it's not something that many people will
use. But if python-dev comes up with the "right way" to divine a
home directory on Windows, we can use that to set /home/greg and poof! --
personal Distutils config files on Windows.
Greg Ward [Tue, 6 Jun 2000 02:57:07 +0000 (02:57 +0000)]
First crack at the Distutils "config" command. Unlike other commands, this
one doesn't *do* anything by default; it's just there as a conduit for data
(eg. include dirs, libraries) from the user to the "build" commands.
However, it provides a couple of Autoconf-ish methods ('try_compile()',
'try_link()', 'try_run()') that derived, per-distribution "config" commands
can use to poke around the target system and see what's available.
Initial experimenst with mxDateTime indicate that higher-level methods are
necessary: analogs of Autoconf's AC_CHECK_HEADER, AC_CHECK_LIB will be
needed too (and that's just to probe the C/C++ system: how to probe the
Python system is wide open, and someday we'll have to worry about probing a
Java system too).
Greg Ward [Sun, 4 Jun 2000 15:30:35 +0000 (15:30 +0000)]
Fixed syntax error.
Half-fixed RPM 2 compatibility:added 'rpm_base' option, which must be set
(to eg. /usr/src/redhat on a stock Red Hat system) if rpm2_mode is on.
Still not quite working, though.
Greg Ward [Sun, 4 Jun 2000 15:00:34 +0000 (15:00 +0000)]
Patch from Harry Henry Gebel:
Fills in question marks in help
Reads scripts in from files rather than strings
Adds RPM 2 compatibility mode (untested). Use of this mode requires that
--bdist-base be specified because bdist_rpm has no way of detecting where
RPM wants to find spec files and source files. An unmodified RedHat 5.0
system would require '--bdist-base=/usr/src/RedHat'. (You would also have
to be root.) If the rpmrc file has been modified to allow RPMs to be built
by normal users then --build-base would need to be changed accordingly.
Formats the changelog.
GPW: tweaked formatting, added some editorial comments.
Greg Ward [Sat, 3 Jun 2000 00:44:30 +0000 (00:44 +0000)]
Added a bunch of new globals in '_init_mac()' -- these will be needed to
support the forthcoming Cygwin/Mingw32 GCC-on-Windows patch.
Standardized CVS id line.
Jack Jansen [Fri, 2 Jun 2000 21:40:07 +0000 (21:40 +0000)]
First version of the project that produces a working Carbon binary. The binary has only been tested on MacOS9, so far. This project needs CW IDE 4.1b4 or later.
Jack Jansen [Fri, 2 Jun 2000 21:35:07 +0000 (21:35 +0000)]
Made the core toolbox modules carbon-compatible using the new greylist feature of bgen: non-carbon methods are still included in non-carbon MacPython. The issue of backward compatibility of Python code is still open.
Macmodule and macosmodule have also been carbonified. Some functionality is still missing there.
Jack Jansen [Fri, 2 Jun 2000 21:28:52 +0000 (21:28 +0000)]
Removed (within an #ifdef) Carbon-incompatabilities:
- Don't call all the toolbox init routines.
- No balloon help, so removed help code from the initial dialog.
Jack Jansen [Fri, 2 Jun 2000 21:27:11 +0000 (21:27 +0000)]
Removed (within an #ifdef) Carbon-incompatabilities:
- Use TickCount() in stead of LMGetTicks()
- Don't use xxxGetFile event filter
- Don't call SystemTask or HandleSysWindowEvent (is this also automatically handled under os9??)
- Don't scan event queue for cmd-. (to be fixed at some point).
Jack Jansen [Fri, 2 Jun 2000 21:23:09 +0000 (21:23 +0000)]
Fixed callback function arguments to be carbon-compatible.
(Temporarily?) removed call to ProcessHighLevelEvent until we find out how to do this (Carbon only).
Greg Ward [Fri, 2 Jun 2000 02:23:42 +0000 (02:23 +0000)]
Bumped version number to 0.9pre (there will be a couple of code snapshots
before the real release, but I want to make it clear that a major new
release is on the way).
Greg Ward [Fri, 2 Jun 2000 01:49:58 +0000 (01:49 +0000)]
Fairly massive overhaul to support getting RPM inputs (extra meta-data,
prep/build/etc. scripts, doc files, dependency info) from a config file
rather than the dedicated "package_info" file. (The idea is that
developers will provide RPM-specific info in the "[bdist_rpm]" section of
setup.cfg, but of course it could also be supplied in the other config
files, on the command line, or in the setup script -- or any mix of the
above.)
Major changes:
* added a boatload of options to 'user_options' and
'initialize_options()': 'distribution_name', 'group', 'release', ...
* added 'finalize_package_data()', which takes the place of
'_get_package_data()' -- except it's called from 'finalize_options()',
not 'run()', so we have everything figured out before we actually run
the command
* added 'ensure_string()', 'ensure_string_list()', 'ensure_filename()';
these take the place of '_check_string()' and friends. (These actually
look like really useful type-checking methods that could come in handy
all over the Distutils; should consider moving them up to Command and
using them in other command classes' 'finalize_options()' method for
error-checking).
* various cleanup, commentary, and adaptation to the new way of
storing RPM info in '_make_spec_file()'
Fred Drake [Thu, 1 Jun 2000 18:37:36 +0000 (18:37 +0000)]
Trent Mick <trentm@ActiveState.com>:
This patch correct bounds checking in PyLong_FromLongLong. Currently, it does
not check properly for negative values when checking to see if the incoming
value fits in a long or unsigned long. This results in possible silent
truncation of the value for very large negative values.
Fred Drake [Thu, 1 Jun 2000 17:59:17 +0000 (17:59 +0000)]
Trent Mick <trentm@activestate.com>:
Fix test of the "math" module so it does not break on platforms that do
not offer rint(); just skip that portion of the test in that case.
Fix bug reported by atkins@gweep.net; re.compile(r"[\100-\410]")
dumps core. Solution: fix check_escape() to match its comment and
use only the low 8 bits of the octal number.
Greg Ward [Thu, 1 Jun 2000 00:40:25 +0000 (00:40 +0000)]
More tweaking to make this command act like other Distutils commands:
* added "--bdist-base" option to parameterize where we build
the RPM (comes from "bdist" by default: "build/bdist.<plat>")
* simplified/cleaned up some code in 'run()' in the process of
removing (most) hard-coded directory names
* if "--spec-only", drop spec file in "dist" rather than "redhat"
(directory name still hard-coded, though)
* use 'reinitialize_command()' to fetch the "sdist" object to
tweak before running "sdist" command
* use 'self.copy_file()' method rather than 'copy_file()' function
* cosmetic tweaks to comments, error messages
Greg Ward [Wed, 31 May 2000 23:56:45 +0000 (23:56 +0000)]
Regularize options a bit:
* help strings start with lowercase
* added affirmative version of '--no-clean' and '--no-rpm-opt-flags',
which are the default (thus the attributes that correspond to
the options are now 'clean' and 'use_rpm_opt_flags')
Greg Ward [Wed, 31 May 2000 01:09:52 +0000 (01:09 +0000)]
Overhauled to expect 'self.extensions' (taken from 'ext_modules' in the
setup script) to be a list of Extension instances, rather than a list of of
(ext_name, build_info) tuples. This is mostly a simplification, but
'check_extension_list()' got a lot more complicated because of the need to
convert the old-style tuples to Extension instances.
Temporarily dropped support for defining/undefining macros in the
'extensions' list -- I want to change the interface, but haven't yet made
the required changes in CCompiler and friends to support this nicely.
Also neatened up the code that merges 'extra_compile_flags' and the CFLAGS
environment variable.