• Carl Meyer's avatar
    bpo-33499: Add PYTHONPYCACHEPREFIX env var for alt bytecode cache location. (GH-6834) · b193fa99
    Carl Meyer yazdı
    In some development setups it is inconvenient or impossible to write bytecode
    caches to the code tree, but the bytecode caches are still useful. The
    PYTHONPYCACHEPREFIX environment variable allows specifying an alternate
    location for cached bytecode files, within which a directory tree mirroring the code
    tree will be created. This cache tree is then used (for both reading and writing)
    instead of the local `__pycache__` subdirectory within each source directory.
    
    Exposed at runtime as sys.pycache_prefix (defaulting to None), and can
    be set from the CLI as "-X pycache_prefix=path".
    
    Patch by Carl Meyer.
    b193fa99
sys.rst 62.6 KB