Commit 7cc16041 authored by Fred Drake's avatar Fred Drake

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).
parent 1699d347
...@@ -509,14 +509,14 @@ calculates the module search path based upon its best guess for the ...@@ -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 location of the standard Python interpreter executable, assuming that
the Python library is found in a fixed location relative to the Python the Python library is found in a fixed location relative to the Python
interpreter executable. In particular, it looks for a directory named 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 interpreter version) relative to the parent directory where the
executable named \file{python} is found on the shell command search executable named \file{python} is found on the shell command search
path (the environment variable \envvar{PATH}). path (the environment variable \envvar{PATH}).
For instance, if the Python executable is found in 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/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 is also the ``fallback'' location, used when no executable file named
\file{python} is found along \envvar{PATH}.) The user can override \file{python} is found along \envvar{PATH}.) The user can override
this behavior by setting the environment variable \envvar{PYTHONHOME}, this behavior by setting the environment variable \envvar{PYTHONHOME},
......
...@@ -509,14 +509,14 @@ calculates the module search path based upon its best guess for the ...@@ -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 location of the standard Python interpreter executable, assuming that
the Python library is found in a fixed location relative to the Python the Python library is found in a fixed location relative to the Python
interpreter executable. In particular, it looks for a directory named 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 interpreter version) relative to the parent directory where the
executable named \file{python} is found on the shell command search executable named \file{python} is found on the shell command search
path (the environment variable \envvar{PATH}). path (the environment variable \envvar{PATH}).
For instance, if the Python executable is found in 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/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 is also the ``fallback'' location, used when no executable file named
\file{python} is found along \envvar{PATH}.) The user can override \file{python} is found along \envvar{PATH}.) The user can override
this behavior by setting the environment variable \envvar{PYTHONHOME}, this behavior by setting the environment variable \envvar{PYTHONHOME},
......
...@@ -15,7 +15,7 @@ and \function{os.path.expandvars()}.) ...@@ -15,7 +15,7 @@ and \function{os.path.expandvars()}.)
Returns a possibly-empty list of path names that match \var{pathname}, Returns a possibly-empty list of path names that match \var{pathname},
which must be a string containing a path specification. which must be a string containing a path specification.
\var{pathname} can be either absolute (like \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. \file{../../Tools/*.gif}), and can contain shell-style wildcards.
\end{funcdesc} \end{funcdesc}
......
...@@ -36,8 +36,10 @@ refers to a directory (rather than a file). No item is added to ...@@ -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 For example, suppose \code{sys.prefix} and \code{sys.exec_prefix} are
set to \file{/usr/local}. The Python \version\ library is then set to \file{/usr/local}. The Python \version\ library is then
installed in \file{/usr/local/lib/python\version}. Suppose this has a installed in \file{/usr/local/lib/python1.5} (note that only the first
subdirectory \file{/usr/local/lib/python\version/site-packages} with three 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 subsubdirectories, \file{foo}, \file{bar} and \file{spam}, and two
path configuration files, \file{foo.pth} and \file{bar.pth}. Assume path configuration files, \file{foo.pth} and \file{bar.pth}. Assume
\file{foo.pth} contains the following: \file{foo.pth} contains the following:
......
...@@ -15,7 +15,7 @@ and \function{os.path.expandvars()}.) ...@@ -15,7 +15,7 @@ and \function{os.path.expandvars()}.)
Returns a possibly-empty list of path names that match \var{pathname}, Returns a possibly-empty list of path names that match \var{pathname},
which must be a string containing a path specification. which must be a string containing a path specification.
\var{pathname} can be either absolute (like \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. \file{../../Tools/*.gif}), and can contain shell-style wildcards.
\end{funcdesc} \end{funcdesc}
......
...@@ -36,8 +36,10 @@ refers to a directory (rather than a file). No item is added to ...@@ -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 For example, suppose \code{sys.prefix} and \code{sys.exec_prefix} are
set to \file{/usr/local}. The Python \version\ library is then set to \file{/usr/local}. The Python \version\ library is then
installed in \file{/usr/local/lib/python\version}. Suppose this has a installed in \file{/usr/local/lib/python1.5} (note that only the first
subdirectory \file{/usr/local/lib/python\version/site-packages} with three 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 subsubdirectories, \file{foo}, \file{bar} and \file{spam}, and two
path configuration files, \file{foo.pth} and \file{bar.pth}. Assume path configuration files, \file{foo.pth} and \file{bar.pth}. Assume
\file{foo.pth} contains the following: \file{foo.pth} contains the following:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment