Skip to content

Commit e09b00d

Browse files
committed
also mention curdir syntax handling
1 parent 55a5e28 commit e09b00d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

peps/pep-0796.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,21 @@ These may contain up-references outside of the virtual environnment root
8686
directory. Examples:
8787

8888
* ``subdir/whatever/bin`` (a directory within the virtual environment).
89+
* ``./subdir/whatever/bin`` (same as above)
8990
* ``../../../../../elsewhere/runtime/bin`` (a directory outside the virtual
9091
environment).
9192

9293
Relative paths are relative to the directory containing ``pyvenv.cfg``. During
9394
interpreter startup (i.e. ``getpath.py``), the relative path is joined to the
94-
directory to form an absolute path. Up-references are resolved syntactically
95-
(i.e. not resolving symlinks). Symlinks are *not* resolved prior to
96-
construction of the absolute path to ensure semantics between a relative path
97-
and absolute path remain the same.
95+
directory to form an absolute path. Up-references (``../``) and current
96+
directory references (``./``) are resolved syntactically (i.e. not resolving
97+
symlinks). Symlinks are *not* resolved prior to construction of the absolute
98+
path to ensure semantics between a relative path and absolute path remain the
99+
same.
98100

99101
For example, given
100102
``/home/user/venv/bin/pyvenv.cfg`` with
101-
``home = ../../runtime/bin``, the result is ``home = /home/user/runtime/bin``,
103+
``home = ../../runtime/./bin``, the result is ``home = /home/user/runtime/bin``,
102104
i.e. it's equivalent to using that value verbatim in ``pyvenv.cfg``.
103105

104106

0 commit comments

Comments
 (0)