|
Original |
Translation |
|
99
|
|
|
|
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
|
|
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.
|
|
|
107
|
The installation base is defined by the :option:`--prefix` option; the :option:`--exec-prefix` option is not supported under Windows. Files are installed as follows:
|
|
|
108
|
:file:`{prefix}\\Scripts`
|
|