Original Translation
97
In either case, the :option:`--prefix` option defines the installation base, and the :option:`--exec-prefix` option defines the platform-specific installation base, which is used for platform-specific files. (Currently, this just means non-pure module distributions, but could be expanded to C libraries, binary executables, etc.) If :option:`--exec-prefix` is not supplied, it defaults to :option:`--prefix`. Files are installed as follows:
98
:file:`{prefix}/bin`
99
:file:`{prefix}/share`
100
There is no requirement that :option:`--prefix` or :option:`--exec-prefix` actually point to an alternate Python installation; if the directories listed above do not already exist, they are created at installation time.
101
Incidentally, the real reason the prefix scheme is important is simply that a standard Unix installation uses the prefix scheme, but with :option:`--prefix` and :option:`--exec-prefix` supplied by Python itself as ``sys.prefix`` and ``sys.exec_prefix``. Thus, you might think you'll never use the prefix scheme, but every time you run ``python setup.py install`` without any other options, you're using it.
102
Note that installing extensions to an alternate Python installation has no effect on how those extensions are built: in particular, the Python header files (:file:`Python.h` and friends) installed with the Python interpreter used to run the setup script will be used in compiling extensions. It is your responsibility to ensure that the interpreter used to run extensions installed in this way is compatible with the interpreter used to build them. The best way to do this is to ensure that the two interpreters are the same version of Python (possibly different builds, or possibly copies of the same build). (Of course, if your :option:`--prefix` and :option:`--exec-prefix` don't even point to an alternate Python installation, this is immaterial.)
103
Alternate installation: Windows (the prefix scheme)
104
Windows has no concept of a user's home directory, and since the standard Python installation under Windows is simpler than under Unix, the :option:`--prefix` option has traditionally been used to install additional packages in separate locations on Windows. ::
105
python setup.py install --prefix="\Temp\Python"
106
to install modules to the :file:`\\Temp\\Python` directory on the current drive.