1 # SPDX-License-Identifier: MIT
3 # Copyright The SCons Foundation
10 platform
= sysconfig
.get_platform()
12 def is_windows() -> bool:
13 """Check if we're on a Windows platform"""
14 return platform
.startswith('win')
17 def whereis(filename
):
19 An internal "whereis" routine to figure out if a given program
20 is available on this system.
25 for dir in os
.environ
['PATH'].split(os
.pathsep
):
26 f
= os
.path
.join(dir, filename
)
29 if os
.path
.isfile(f_ext
):
34 if stat
.S_IMODE(st
[stat
.ST_MODE
]) & 0o111:
39 # Datestring for debian
40 # Should look like: Mon, 03 Nov 2016 13:37:42 -0700
41 deb_date
= time
.strftime("%a, %d %b %Y %H:%M:%S +0000", time
.gmtime())