Commit Graph

597 Commits

Author SHA1 Message Date
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
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
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
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
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
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
Greg Ward 8d5b5ec513 Typo fix. 2000-09-07 02:38:42 +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
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
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
Greg Ward 9821bf4e62 Added 'script_name' and 'script_args' instance attributes to Distribution.
Changed 'core.setup()' so it sets them to reasonable defaults.
Tweaked how the "usage" string is generated: 'core' now provides
  'gen_usage()', which is used instead of 'USAGE'.
Modified "build_py" and "sdist" commands to refer to
  'self.distribution.script_name' rather than 'sys.argv[0]'.
2000-08-29 01:15:18 +00:00
Greg Ward 6f9320b9d1 Fix line-endings.
Fix bad operator precedence: should be "(metadata or '') + '\n'".
2000-08-27 20:44:13 +00:00
Greg Ward 018cbb15c0 New release of the Windows installer from Thomas Heller.
The known bug (bogus error message when an empty file is
extracted) is fixed.

Other changes:

- The target-compile and target-optimize flags of bdist_wininst
  are gone. It is no longer possible to compile the python
  files during installation.
- The zlib module is no longer required or used by bdist_wininst.

- I moved the decompression/extraction code into a separate
  file (extract.c).

- The installer stub is now compressed by UPX (see
  http://upx.tsx.org/). This reduces the size of the exe
  (and thus the overhead of the final installer program)
  from 40 kB to 16 kB.

- The installer displays a more uptodate user wizard-like
  user interface, also containing a graphic: Just's Python Powered logo.
  (I could not convince myself to use one of the BeOpen logos).
- The installation progress bar now moves correctly.
2000-08-26 02:40:10 +00:00
Greg Ward 889de85d8b Bumped version to 0.9.2pre. 2000-08-26 02:37:07 +00:00
Greg Ward d8014e6608 In 'check_extensions_list()': when converting old-style 'buildinfo' dict,
don't assign None to any attributes of the Extension object.
2000-08-26 02:21:55 +00:00
Greg Ward 986659fffe Don't bother to 'mkpath()' the 'dist_dir' -- that's now taken care of
in archive_util.py.
2000-08-22 01:49:41 +00:00
Greg Ward 04e25a1bdf Ensure destination directory exists before trying to create a tarball
or ZIP file.
2000-08-22 01:48:54 +00:00
Greg Ward f40ff1b8b2 Bump version to 0.9.1. 2000-08-15 13:14:27 +00:00
Greg Ward 44a980dff9 Fixed the move-RPM-files hack so it knows about the '--binary-only' and
'--source-only' options.
2000-08-15 13:05:35 +00:00
Greg Ward a12c195064 Added support for the '--dist-dir' option, including a mildly nasty
hack to find the two created RPM files (source and binary) and
move them to the "dist dir" (default "dist").
2000-08-15 13:03:16 +00:00
Greg Ward c0fe82ca26 Fix long-hidden inconsistency in internal interface: 'find_modules()' now
represents packages as strings, not tuples.  This allowed a simplification
in 'get_package_dir()', too -- can now assume that 'package' is a string.
2000-08-15 13:01:25 +00:00
Greg Ward e8e9d11453 Overhauld 'check_config_h()': now returns a (status, details) tuple,
and is much better documented to boot.
2000-08-13 01:18:55 +00:00
Greg Ward 1398045136 Added a whinging comment about the ugliness of constructing the BCPP
argument list.
2000-08-13 00:54:39 +00:00
Greg Ward b1dceae3df Rene Liebscher:
* use self.debug_print() for debug messages
  * uses now copy.copy() to copy lists
  * added 'shared_lib_extension=".dll"', ... , this is necessary if you
    want use the compiler class outside of the standard distutils build
    process.
  * changed result type of check_config_h() from int to string
2000-08-13 00:43:56 +00:00
Greg Ward a4662bc1bc Rene Liebscher:
* changed some list.extend([...]) to list.append(...)
  * added '/g0' to compiler_options, so compiler doesn't
    stop after 100 warnings
2000-08-13 00:43:16 +00:00