[Scons-users] A problem regarding CacheDir

Steve Hill (Wireless) Steve.Hill1 at viavisolutions.com
Tue Dec 20 03:06:41 EST 2022


Hi all,

I have decided to have a play with using CacheDir with SCons 4.2.0 on Windows 10 with Python 3.8. The first time that I ran this, it worked (in so far as the - local, for now - cache directory was created) but any subsequent runs fail with a "Bad file descriptor" error when it tries to look up objects in the cache. Digging into the code, the issue seems to be with this line:

            with open(config_file, 'x') as config:

Event though the config file *does* exist, open() does not seem to be raising a FileExistsError but, when the file is used to write the default config (json.dump(self.config, config)), you get the "Bad file descriptor" exception. By putting the following hack before that line, the cache bursts into life:

            if os.path.exists(config_file):
                raise FileExistsError()

I just wanted to check: is CacheDir supported under Windows?

Thanks,

S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20221220/3567ea5f/attachment.htm>


More information about the Scons-users mailing list