Christian Heimes <li...@cheimes.de> added the comment:
The cache prefix mirrors the directory structure. Python takes the absolute path to the .py file, converts the path to a relative path by stripping off the leading slash, and finally joins the path with the prefix. Take this example: $ PYTHONPYCACHEPREFIX=/tmp/pycache python3.10 -c pass This will create the cache file "/tmp/pycache/usr/lib64/python3.10/os.cpython-310.pyc" for the Python file "/usr/lib64/python3.10/os.py. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45977> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com