Commit Graph

551 Commits

Author SHA1 Message Date
Greg Ward 113e70efa2 Patch from Joe Van Andel: fix arg to % operator in warning. 2000-02-02 00:07:14 +00:00
Greg Ward d1466b968f Allow either README or README.txt as a "standard file". 2000-01-30 20:22:27 +00:00
Greg Ward 37bc815053 Added 'description' class attribute to every command class (to help the
'--help-commands' option).
Shuffled imports around in a few command modules to avoid expensive
  up-front import of sysconfig (and resulting delays in generating list
  of all commands).
2000-01-30 18:34:15 +00:00
Greg Ward 4c67936e4e Added 'dist' command. 2000-01-30 18:31:34 +00:00
Greg Ward 7478a4832a Added missing run of corresponding 'build' command. 2000-01-30 15:07:56 +00:00
Greg Ward 9f200cbaa6 Fix indentation bug. 2000-01-17 21:58:07 +00:00
Greg Ward 1b3a9af5cf Added missing import.
Fixed 'make_release_tree()' to copy files if 'os.link()' doesn't exist.
2000-01-17 20:23:34 +00:00
Greg Ward cbeca7b408 Added code to use Jim Ahlstrom's zipfile.py module if the external zip
command wasn't found or failed.  (Code supplied by Thomas Heller
<thomas.heller@ion-tof.com>.)
2000-01-17 18:04:04 +00:00
Greg Ward c27d800251 Always run sys.prefix and sys.exec_prefix through 'os.path.normpath()'
before storing or using.
2000-01-17 16:25:59 +00:00
Greg Ward 7c463ef362 Ditch unneeded imports. 2000-01-17 16:25:17 +00:00
Greg Ward e9436da686 Typo fix: 'file.warn' should have been 'manifest.warn' in a couple of places. 2000-01-09 22:39:32 +00:00
Greg Ward ad83f04086 Catch errors from 'rmtree' and emit a warning. 1999-12-16 01:14:15 +00:00
Greg Ward 97798b1d47 Use 'search', not 'match', on filename pattern regexes. 1999-12-13 21:38:57 +00:00
Greg Ward 1d0495e05c Catch missing MANIFEST file and warn rather than blowing up.
Added 'nuke_release_tree()' method to blow away the directory from
  which the archive file(s) are created, and call it (conditionally)
  from 'make_distribution()'.
Added 'keep_tree' option (false by default) to disable the call to
  'nuke_release_tree()'.
1999-12-12 17:07:22 +00:00
Greg Ward 9b45443c1b Fixed 'find_package_modules()' to ensure that we never build (and thus
install) the setup script itself.
Fixed 'build_module()' so we do *not* preserve file mode (which means
  we can install read-only files, which makes the next installation
  of this distribution fail -- at least under Unix); added a comment
  explaining this.
1999-12-12 17:03:59 +00:00
Greg Ward 48697d931b Changed 'build_extensions()' so 'sources' can be a list or tuple; and
call CCompiler method 'compile()' with 'include_dirs' not 'includes'.
Fixed stupid typo in 'get_source_files()'.
1999-12-12 17:01:01 +00:00
Greg Ward 631e6a0c07 [from 1999-11-04]
Bunch of little bug fixes that appeared in building non-packagized
distributions.  Mainly:
  - brain-slip typo in 'get_package_dir()'
  - don't try to os.path.join() an empty path tuple -- it doesn't like it
  - more type-safety in 'build_module()'
1999-12-03 16:18:56 +00:00
Greg Ward e1ada50559 Don't assume GNU tar -- generate tar file and compress in separate steps.
Now supports the full range of intended formats (tar, ztar, gztar, zip).
"-f" no longer a short option for "--formats" -- conflicts with new
  global option "--force"!
1999-10-23 19:25:05 +00:00
Greg Ward d6c30f66c7 Removed massive comment speculating about needlessly complex variations
on the manifest file syntax.
1999-10-23 19:10:59 +00:00
Greg Ward 6bad86462b Fix how we run 'zip' -- give explicit .zip extension. 1999-10-23 19:06:20 +00:00
Greg Ward ef93095adb Filter 'glob()' results so we only look at regular files. 1999-10-03 21:09:14 +00:00
Greg Ward 3c6204a87f Pass 'force' flag to 'new_compiler()'. 1999-10-03 21:08:42 +00:00
Greg Ward 455eb61648 Don't import what we don't use. 1999-10-03 21:07:21 +00:00
Greg Ward ef9ad6df01 Tweaked verbosity messages for byte-compilation. 1999-10-03 21:03:26 +00:00
Greg Ward b24afe19db Added 'list_only' option (and modified 'run()' to respect it). 1999-09-29 13:14:27 +00:00
Greg Ward ef4490f501 New command to generate source distribution based on a manifest file. 1999-09-29 12:50:13 +00:00
Greg Ward a6cb8ae7bc Added 'package' option.
Catch up with renamed 'platdir' -> 'build_platlib' option in 'build'.
Don't call 'set_final_options()' in 'run()' anymore -- that's now
  guaranteed to be taken care of for us by the Distribution instance.
If 'include_dirs' is a string, split it on os.pathsep (this is half-
  hearted -- support for setting compile/link options on the command
  line is totally lame and probably won't work at all).
Added 'get_source_files()' for use by 'dist' command.
Added code to 'build_extensions()' to figure out the "def file" to use
  with MSVC++ and add it to the linker command line as an "extra_postarg".
1999-09-29 12:49:35 +00:00
Greg Ward 2a612067e6 Renamed 'dir' option to be consistent with other commands.
Don't call 'set_final_options()' in 'run()' anymore -- that's now
  guaranteed to be taken care of for us by the Distribution instance.
Rearranged to bit to allow outsiders (specifically, the 'dist' command)
  to find out what modules we would build:
  - 'find_modules()' renamed to 'find_package_modules()'
  - most of 'build_modules()' abstracted out to 'find_modules()'
  - added 'get_source_files()' (for the 'dist' command to use)
  - drastically simplified 'build_modules()' -- now just a wrapper around
    'find_modules()' and 'build_module()'
1999-09-29 12:44:57 +00:00
Greg Ward e6ac2fcc12 Renamed many options to be consistent across commands.
Tweaked some help strings to be consistent with documentation.
Don't call 'set_final_options()' in 'run()' anymore -- that's now
  guaranteed to be taken care of for us by the Distribution instance.
1999-09-29 12:38:18 +00:00
Greg Ward d4b8429fc5 Added docstring, brought __all__ up-to-date. 1999-09-21 18:33:09 +00:00
Greg Ward 865de83668 Added 'install_path' option for giving non-packagized module
distributions their own directory (and .pth file).
Overhauled how we determine installation directories in
  'set_final_options()' to separate platform-dependence and take
  'install_path' option into account.
Added 'create_path_file()' to create path config file when 'install_path'
  given.
Only run 'install_py' and 'install_ext' when, respectively, there are
  some pure Python modules and some extension modules in the distribution.
1999-09-21 18:31:14 +00:00
Greg Ward 02e1c56212 Only run build_py if we have pure Python modules, and build_ext if we
have extension modules.
1999-09-21 18:27:55 +00:00
Greg Ward dbb96253ea Some option changes:
- rename 'dir' to 'build_dir'
  - take 'package' from distribution option 'ext_package'
  - take 'extensions' from distribution option 'ext_modules'
  - take 'include_dirs' from distribution
Name keyword args explictly when calling CCompiler methods.
Overhauled how we generate extension filenames (in 'extension_filename()
  and 'build_extension()') to take 'package' option into account.
1999-09-21 18:27:12 +00:00
Greg Ward 17dc6e7ed8 Basically a complete rewrite to support dealing with modules in whole
packages and searching for source files by 'package_dir'.
1999-09-21 18:22:34 +00:00
Greg Ward fa4eb188f4 Changed selection of installation directories (in 'set_final_options()')
so that pure Python modules are installed to the platform-specific
directory if there are any extension modules in this distribution.
1999-09-13 13:58:34 +00:00
Greg Ward c9c011cd96 Straightened up the selection of installation directories for platform-
specific files; it was somewhat broken, and the comments were dead
  wrong.
Now runs 'install_ext' command after 'install_py'.
1999-09-13 13:57:26 +00:00
Greg Ward 609a5c818d Added support for 'package' option, including where to link the
actual extension module to.
1999-09-13 13:55:34 +00:00
Greg Ward 68bdf3eeb7 Comment addition. 1999-09-13 13:54:06 +00:00
Greg Ward 36e68e21b4 Now run 'build_ext'.
Default platform-specific build directory changed to 'build/platlib'.
1999-09-13 13:52:12 +00:00
Greg Ward 3b120ab374 New command -- install_ext to install extension modules. 1999-09-13 03:10:25 +00:00
Greg Ward 71eb8644d7 Changed to reflect the new "command options" regime -- in particular,
we no longer explicitly pull distribution options out of our Distribution
object, but rather let the Distribution put them into the command object.
1999-09-08 02:42:30 +00:00
Greg Ward 440e2f51ea Patch from Perry Stoll: typo fix, make sure we only compile .py files. 1999-08-29 18:19:37 +00:00
Greg Ward 5d60fcf02a Patch from Perry Stoll: OK for list of modules to be empty. 1999-08-29 18:19:01 +00:00
Greg Ward 2f1b5bb905 Patch from Perry Stoll: pass 'build_info' to link method. 1999-08-29 18:18:26 +00:00
Greg Ward 1016af9fa6 Oops, call 'os.path.join()'! 1999-08-19 20:02:10 +00:00
Greg Ward e393ddb2e0 Implements the 'build_ext' command for building C/C++ extension modules. 1999-08-14 23:57:49 +00:00
Greg Ward ba3f108ec0 Added a self-berating command relating to installation directories for
module distributions that contain platform-specific files.
1999-07-10 02:02:31 +00:00
Greg Ward 9a33707be7 Hacked 'set_final_options()' to set (hopefully) appropriate values for
'install_site_lib' and install_site_platlib' on non-POSIX platforms.
Should at least work for NT, as this is adopted from Amos Latteier's NT
patches.  Also added extensive comments bitching about the inadequacy of
the current model, both under POSIX and NT (and probably other) systems.
1999-06-08 02:04:36 +00:00
Greg Ward 0f72695da3 Rearranged things so that compilation of .py files is the responsibility
of the 'install_py' command rather than 'build_py'.  Obviously, this
meant that the 'build_py' and 'install_py' modules had to change; less
obviously, so did 'install' and 'build', since these higher-level
commands must make options available to control the lower-level
commands, and some compilation-related options had to migrate with the
code.
1999-05-02 21:39:13 +00:00
Greg Ward 4070f50537 Changed to use the method versions of 'copy_file()', 'copy_tree()',
and 'make_file()'-- that way, the verbose and dry-run flags are
handled for free.
1999-04-04 02:46:29 +00:00
Greg Ward 13ae1c8ff8 First checkin of real Distutils command modules. 1999-03-22 14:55:25 +00:00