Don't assume that \version expands to the 3-character major.minor number; it

is the full release version name ("1.5.1beta1", for instance).
This commit is contained in:
Fred Drake 1998-04-09 14:12:11 +00:00
parent 9da38814a3
commit 2de75ec245
6 changed files with 14 additions and 10 deletions

View File

@ -509,14 +509,14 @@ calculates the module search path based upon its best guess for the
location of the standard Python interpreter executable, assuming that
the Python library is found in a fixed location relative to the Python
interpreter executable. In particular, it looks for a directory named
\file{lib/python\version} (replacing \file{\version} with the current
\file{lib/python1.5} (replacing \file{1.5} with the current
interpreter version) relative to the parent directory where the
executable named \file{python} is found on the shell command search
path (the environment variable \envvar{PATH}).
For instance, if the Python executable is found in
\file{/usr/local/bin/python}, it will assume that the libraries are in
\file{/usr/local/lib/python\version}. (In fact, this particular path
\file{/usr/local/lib/python1.5}. (In fact, this particular path
is also the ``fallback'' location, used when no executable file named
\file{python} is found along \envvar{PATH}.) The user can override
this behavior by setting the environment variable \envvar{PYTHONHOME},

View File

@ -509,14 +509,14 @@ calculates the module search path based upon its best guess for the
location of the standard Python interpreter executable, assuming that
the Python library is found in a fixed location relative to the Python
interpreter executable. In particular, it looks for a directory named
\file{lib/python\version} (replacing \file{\version} with the current
\file{lib/python1.5} (replacing \file{1.5} with the current
interpreter version) relative to the parent directory where the
executable named \file{python} is found on the shell command search
path (the environment variable \envvar{PATH}).
For instance, if the Python executable is found in
\file{/usr/local/bin/python}, it will assume that the libraries are in
\file{/usr/local/lib/python\version}. (In fact, this particular path
\file{/usr/local/lib/python1.5}. (In fact, this particular path
is also the ``fallback'' location, used when no executable file named
\file{python} is found along \envvar{PATH}.) The user can override
this behavior by setting the environment variable \envvar{PYTHONHOME},

View File

@ -15,7 +15,7 @@ and \function{os.path.expandvars()}.)
Returns a possibly-empty list of path names that match \var{pathname},
which must be a string containing a path specification.
\var{pathname} can be either absolute (like
\file{/usr/src/Python\version/Makefile}) or relative (like
\file{/usr/src/Python-1.5/Makefile}) or relative (like
\file{../../Tools/*.gif}), and can contain shell-style wildcards.
\end{funcdesc}

View File

@ -36,8 +36,10 @@ refers to a directory (rather than a file). No item is added to
For example, suppose \code{sys.prefix} and \code{sys.exec_prefix} are
set to \file{/usr/local}. The Python \version\ library is then
installed in \file{/usr/local/lib/python\version}. Suppose this has a
subdirectory \file{/usr/local/lib/python\version/site-packages} with three
installed in \file{/usr/local/lib/python1.5} (note that only the first
three characters of \code{sys.version} are used to form the path
name). Suppose this has a subdirectory
\file{/usr/local/lib/python1.5/site-packages} with three
subsubdirectories, \file{foo}, \file{bar} and \file{spam}, and two
path configuration files, \file{foo.pth} and \file{bar.pth}. Assume
\file{foo.pth} contains the following:

View File

@ -15,7 +15,7 @@ and \function{os.path.expandvars()}.)
Returns a possibly-empty list of path names that match \var{pathname},
which must be a string containing a path specification.
\var{pathname} can be either absolute (like
\file{/usr/src/Python\version/Makefile}) or relative (like
\file{/usr/src/Python-1.5/Makefile}) or relative (like
\file{../../Tools/*.gif}), and can contain shell-style wildcards.
\end{funcdesc}

View File

@ -36,8 +36,10 @@ refers to a directory (rather than a file). No item is added to
For example, suppose \code{sys.prefix} and \code{sys.exec_prefix} are
set to \file{/usr/local}. The Python \version\ library is then
installed in \file{/usr/local/lib/python\version}. Suppose this has a
subdirectory \file{/usr/local/lib/python\version/site-packages} with three
installed in \file{/usr/local/lib/python1.5} (note that only the first
three characters of \code{sys.version} are used to form the path
name). Suppose this has a subdirectory
\file{/usr/local/lib/python1.5/site-packages} with three
subsubdirectories, \file{foo}, \file{bar} and \file{spam}, and two
path configuration files, \file{foo.pth} and \file{bar.pth}. Assume
\file{foo.pth} contains the following: