def machine():
"""
Return machine suffix to use in directory name when looking
for bootloader.
PyInstaller is reported to work even on ARM architecture. For that
case functions system() and architecture() are not enough.
Path to bootloader has to be composed from system(), architecture()
and machine() like:
'Linux-32bit-arm'
"""
mach = platform.machine()
if mach.startswith('arm'):
return 'arm'
else:
# Assume x86/x86_64 machine.
return None
# Set and get environment variables does not handle unicode strings correctly
# on Windows.
# Acting on os.environ instead of using getenv()/setenv()/unsetenv(),
# as suggested in <http://docs.python.org/library/os.html#os.environ>:
# "Calling putenv() directly does not change os.environ, so it's
# better to modify os.environ." (Same for unsetenv.)
评论列表
文章目录