This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients andrei.avk, christian.heimes
Date 2021-12-06.09:04:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1638781461.71.0.0818314843256.issue45977@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-12-06 09:04:21christian.heimessetrecipients: + christian.heimes, andrei.avk
2021-12-06 09:04:21christian.heimessetmessageid: <1638781461.71.0.0818314843256.issue45977@roundup.psfhosted.org>
2021-12-06 09:04:21christian.heimeslinkissue45977 messages
2021-12-06 09:04:21christian.heimescreate