@@ -625,7 +625,7 @@ Process-wide parameters
625
625
returned string points into static storage; the caller should not modify its
626
626
value. This corresponds to the :makevar: `prefix ` variable in the top-level
627
627
:file: `Makefile ` and the :option: `--prefix ` argument to the :program: `configure `
628
- script at build time. The value is available to Python code as ``sys.prefix ``.
628
+ script at build time. The value is available to Python code as ``sys.base_prefix ``.
629
629
It is only useful on Unix. See also the next function.
630
630
631
631
This function should not be called before :c:func: `Py_Initialize `, otherwise
@@ -635,7 +635,8 @@ Process-wide parameters
635
635
It now returns ``NULL `` if called before :c:func: `Py_Initialize `.
636
636
637
637
.. deprecated-removed :: 3.13 3.15
638
- Get :data: `sys.prefix ` instead.
638
+ Get :data: `sys.base_prefix ` instead, or :data: `sys.prefix ` if
639
+ :ref: `virtual environments <venv-def >` need to be handled.
639
640
640
641
641
642
.. c :function :: wchar_t * Py_GetExecPrefix ()
@@ -648,7 +649,8 @@ Process-wide parameters
648
649
should not modify its value. This corresponds to the :makevar: `exec_prefix `
649
650
variable in the top-level :file: `Makefile ` and the ``--exec-prefix ``
650
651
argument to the :program: `configure ` script at build time. The value is
651
- available to Python code as ``sys.exec_prefix ``. It is only useful on Unix.
652
+ available to Python code as ``sys.base_exec_prefix ``. It is only useful on
653
+ Unix.
652
654
653
655
Background: The exec-prefix differs from the prefix when platform dependent
654
656
files (such as executables and shared libraries) are installed in a different
@@ -679,7 +681,8 @@ Process-wide parameters
679
681
It now returns ``NULL`` if called before :c:func:`Py_Initialize`.
680
682
681
683
.. deprecated-removed:: 3.13 3.15
682
- Get :data:`sys.exec_prefix` instead.
684
+ Get :data:`sys.base_exec_prefix` instead, or :data:`sys.exec_prefix` if
685
+ :ref:`virtual environments <venv-def>` need to be handled.
683
686
684
687
685
688
.. c:function:: wchar_t* Py_GetProgramFullPath()
0 commit comments