Commit Graph

64 Commits

Author SHA1 Message Date
Jeremy Hylton dc8412e541 Move warning about directory not on sys.path to debug level.
Fix a bunch of multiline string constants that used +.
2002-06-04 21:20:08 +00:00
Andrew M. Kuchling b26ca9db2e Revert part of previous patch: several install_* subcommands expect
.compile to be None, and set it to true if it is.
    Caught by Pearu Peterson.

Bugfix candidate, if the previous change is accepted for
release22-maint.
2002-03-22 15:35:17 +00:00
Andrew M. Kuchling 3f1822b468 Add missing Boolean options
Remove unused no_compile flag
Initialize the Boolean attribute .compile to 0 instead of None

Bugfix candidate.
2002-03-21 23:46:54 +00:00
Marc-André Lemburg 2544f51036 OS/2 patches by Andrew I MacIntyre for distutils.
Closes patch #435381.
2002-01-31 18:56:00 +00:00
Fred Drake 21d45356b8 Whitespace normalization. 2001-12-06 21:01:19 +00:00
Andrew M. Kuchling a8ea5ba8a9 [Bug #436732] install.py does not record a created *.pth file in the
INSTALLED_FILES output.  Modified version of a patch from
   Jon Nelson (jnelson)
2001-09-04 20:06:43 +00:00
Greg Ward f17efb93d9 Patch #449054 to implement PEP 250. The standard install directory for
modules and extensions on Windows is now $PREFIX/Lib/site-packages.
Includes backwards compatibility code for pre-2.2 Pythons.  Contributed
by Paul Moore.
2001-08-23 20:53:27 +00:00
Andrew M. Kuchling 665f248806 Add forgotten import 2001-08-10 18:59:59 +00:00
Andrew M. Kuchling 9710297e36 Modified version of a patch from Jeremy Kloth, to make .get_outputs()
produce a list of unique filenames:
    "While attempting to build an RPM using distutils on Python 2.0,
    rpm complained about duplicate files.  The following patch fixed
    that problem.
2001-01-16 16:16:03 +00:00
Andrew M. Kuchling 8fe2c12d49 Add forgotten initialization. Fixes bug #120994, "Traceback with
DISTUTILS_DEBUG set"
2000-12-20 00:48:12 +00:00
Greg Ward fa9ff76aae Untabified. 2000-10-14 04:06:40 +00:00
Greg Ward 0b4dafc39b Lyle Johnson: use 'normcase()' in addition to 'normpath()' when testing if
we actually installed modules to a directory in sys.path.
2000-10-14 03:47:07 +00:00
Greg Ward a9d37835ad Fixed so --no-compile is a negative alias for --compile. 2000-10-03 03:31:52 +00:00
Greg Ward 8161022d4d Added --compile, --optimize options so users have an easy way to
instruct the "install_lib" command from the command-line.
2000-10-02 02:16:04 +00:00
Greg Ward cb1f4c4d33 Standardized whitespace around function calls. 2000-09-30 18:27:54 +00:00
Greg Ward 70b1fd1a99 Moved some things around for better organization. 2000-09-30 17:05:37 +00:00
Greg Ward 99b032eaf2 Added 'boolean_options' list to support config file parsing. 2000-09-25 01:41:15 +00:00
Greg Ward 379a02ffa9 Changed all paths in the INSTALL_SCHEMES dict to Unix syntax, and added
'convert_paths()' method to convert them all to the local syntax (backslash
or colon or whatever) at the appropriate time.

Added SCHEME_KEYS to get rid of one hard-coded list of attributes (in
'select_scheme()').

Default 'install_path_file' to true, and never set it false (it's just
there in case some outsider somewhere wants to disable installation of the
.pth file for whatever reason).

Toned down the warning emitted when 'install_path_file' is false, since we
no longer know why it might be false.

Added 'warn_dir' flag to suppress warning when installing to a directory
not in sys.path (again, we never set this false -- it's there for outsiders
to use, specifically the "bdist_*" commands).

Pulled the loop of 'change_root()' calls out to new method 'change_roots()'.

Comment updates/deletions/additions.
2000-09-22 01:31:08 +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 e918b6fdb5 Typo fix. 2000-09-16 01:59:06 +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 3a0310a328 Added --force (-f) option to force installation (including bytecode
compilation).
2000-09-13 01:02:25 +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 1b024d37a7 Fix so the 'install_libbase' directory -- where .pth files are installed --
participates in the "--root" hack, ie. it also has a new root directory
hacked on at the very last minute (essential if the .pth file is to be
included in an RPM or other smart installer!).
2000-08-07 00:48:04 +00:00
Greg Ward ab3a0f36ed Fixed imports from '*util' modules to not just import everything from util. 2000-08-05 01:31:54 +00:00
Greg Ward fa2f4b6d8e Changed the default installation directory for data files (used by
the "install_data" command to the installation base, which is usually just
sys.prefix.  (Any setup scripts out there that specify data files will have
to set the installation directory, relative to the base, explicitly.)
2000-06-24 17:22:39 +00:00
Greg Ward e2383a6c77 Rene Liebscher: when fixing up directories with an alternate root, include
'install_headers'.
2000-06-21 03:09:02 +00:00
Greg Ward c566232c4d Fixed install directory for header files on Unix. 2000-06-17 01:34:45 +00:00
Greg Ward d8dfb4c4b8 Renamed 'native_path()' to 'convert_path()'.
Also changed it so it doesn't barf if the path is already in native format
  (ie. contains os.sep).
2000-05-31 02:32:10 +00:00
Greg Ward fbb04c448c Only print debugging output if DEBUG (imported from distutils.core) is true. 2000-05-28 23:47:31 +00:00
Greg Ward 4fb29e55f8 Some far-reaching naming changes:
* Command method 'find_peer()' -> 'get_finalized_command()'
  * Command method 'run_peer()' -> 'run_command()'
Also deleted the 'get_command_option()' method from Command, and
  fixed the one place where it was used (in "bdist_dumb").
2000-05-27 17:27:23 +00:00
Greg Ward cae5a1f444 Support for the "install_headers" command:
* 'headers' entry added to all the install schemes
  * '--install-headers' option added
  * 'install_headers' added to 'sub_commands'
  * added 'dist_name' to configuration variables (along with a few
    others that seem handy: 'dist_version', 'dist_fullname', and
    'py_version'
  * in 'finalize_unix()', make sure 'install_headers' defined if
    user specified 'install_base' and/or 'install_platbase'
  * added 'has_headers()'
  * a few other small changes
2000-05-27 01:33:12 +00:00
Greg Ward fcd974efbb Normalized all the end-of-class lines. 2000-05-25 01:10:04 +00:00
Greg Ward a4adafd55b Changed the semantics of the 'sub_commands' list: instead of function
objects, it now has method names.
Added three methods, 'has_lib()', 'has_scripts()', and 'has_data()'
  to determine if we need to run each of the three possible sub-commands.
Added 'get_sub_commands()' to take care of finding the methods named
  in 'sub_commands', running them, and interpreting the results to
  build a list of sub-commands that actually have to be run.
2000-05-20 15:17:09 +00:00
Gregory P. Smith 0ec8ef1601 Made the '--record' option take an argument, which is the name of the
file to write the list of installed files to.
2000-05-13 02:16:45 +00:00
Gregory P. Smith 7e855ef6ad Ditch the explicit search for *.py[co] files -- they're now included in
the list returned by 'get_outputs()', thanks to changes in the
"install_lib" command.
2000-05-13 02:13:53 +00:00
Gregory P. Smith f9ebf98725 Moved check for installation to non-sys.path location so it comes
last (after writing list of installed files) -- that way, the warning
is more visible.
2000-05-13 02:01:22 +00:00
Gregory P. Smith 8cb676195b Harry Henry Gebel: add the "--record" option to write the list of
installed files to INSTALLED_FILES.
2000-05-13 01:58:19 +00:00
Gregory P. Smith 17f641c143 Fixed 'select_scheme()' so it doesn't override a directory attribute that's
already been set (eg. by a command-line option).
2000-05-12 01:54:50 +00:00
Gregory P. Smith 74ead8ff5d Added --skip-build option, so lazy debuggers/testers (mainly me) don't
have to wade through all the 'build' output when testing installation.
2000-05-12 01:46:47 +00:00
Gregory P. Smith b2e3bb3d6a Patch from Bastien Kleineidam:
adds the 'install_data' and 'install_scripts' commands; these two
are trivial thanks to the 'install_misc' base class in cmd.py.
(Minor tweaks and commentary by me; the code is untested so far.)
2000-05-12 00:52:23 +00:00
Greg Ward 6a647bb910 Added the "--root" option as a sort of meta-install-base; if supplied,
it is forcibly prepended onto all installation directories, even if
  they are already absolute.
Added 'dump_dirs()' to clean up the debug output a bit.
2000-04-27 01:56:38 +00:00
Greg Ward ff2d9b7154 Hacked things up a bit so that configuration variables are expanded
in command-line options, and in two phases at that: first, we expand
'install_base' and 'install_platbase', and then the other 'install_*'
options.  This lets us do tricky stuff like
    install --prefix='/tmp$sys_prefix'
...oooh, neat.

Simplified 'select_scheme()' -- it's no longer responsible for expanding
config vars, tildes, etc.

Define installation-specific config vars in 'self.config_vars', rather than
in a local dictionary of one method.  Also factored '_expand_attrs()' out
of 'expand_dirs()' and added 'expand_basedirs()'.

Added a bunch of debugging output so I (and others) can judge the
success of this crazy scheme through direct feedback.
2000-04-26 02:38:01 +00:00
Greg Ward ba38d12063 Fixed 'get_outputs()' so it actually works.
Added 'get_inputs()' (which is strikingly similar to 'get_outputs()' - sigh).
Cosmetic tweaks.
2000-03-31 02:52:02 +00:00
Greg Ward ee94c57fe9 Changed so the sub-commands we rely on to do the real work is specified
in a class attribute 'sub_commands', rather than hard-coded in 'run()'.
  This should make it easier to subclass 'install', and also makes it
  easier to keep 'run()' and the new 'get_outputs()' consistent.
Added 'get_outputs()' in preparation for the 'bdist' command.
2000-03-29 02:15:57 +00:00
Greg Ward 790c110c48 Revised tons of comments to reflect the current state of affairs better.
Deleted some crufty code.
2000-03-22 00:51:18 +00:00
Greg Ward 048ca7dcaf Run 'install_lib' instead of 'install_py', and ditch 'install_ext'
completely (was already commented-out).
2000-03-22 00:40:16 +00:00
Greg Ward 066af1074d Dropped any notion of allowing the user to specify the build directories:
these must come from the 'build' command.  This means we no longer need
the misconceived 'set_peer_option()' method in Command and, more importantly,
sweeps away a bunch of potential future complexity to handle this tricky
case.
2000-03-22 00:30:54 +00:00
Greg Ward a233d86638 Yet another complete rewrite. Hopefully the *last* complete rewrite of
this command for a while; this implements roughly the plan cooked up by
Guido, Fred, and me.  Seems to strike a nice balance between usability in
the common cases (just set one option), expandability for more types of
files to install in future, and customizability of installation
directories.

This revision isn't completely working: standard and alternate
installations work fine, but there are still some kinks to work out of
customized installations.
2000-03-22 00:15:45 +00:00
Greg Ward 3ce77fd05e Changed '__rcsid__' to '__revision__'. 2000-03-02 01:49:45 +00:00