PySystemState.dont_write_bytecode field is set to true when that environment variable is set or the flag used. However PySystemState.initCacheDirectory creates the cache directory regardless of that field's value.
This directory is used by SysPackageManager to cache packages.idx and .pkc files with permissions (0600) so this causes an issue (similar to #93) that blocks our archiving system.
Is there a use-case where bytecode writing is blocked but package caching desired?