§ !A?h(R ã ó — d Z ddlZddlZddlZddlZddlZddlZddlm Z ddl mZ ddlm Z ddlmZ ddlmZ d„ Zd „ Zd „ Zd„ Zdad„ Zd „ Zdd„Zdxaxaad„ Zd„ Zdd„Zd„ Z dd„Zd„ Z dd„Z! dd„Z" G d„ d¦ « Z#dS ) zudistutils.util Miscellaneous utility functions -- anything that doesn't fit into one of the other *util.py modules. é N)ÚDistutilsPlatformError)Únewer)Úspawn)Úlog)ÚDistutilsByteCompileErrorc ó — t j dk rrdt j ¦ « v rdS dt j ¦ « v rdS dt j ¦ « v rdS t j S dt j v rt j d S t j d k st t d ¦ « st j S t j ¦ « \ } }}}}| ¦ « dd¦ « } | d d¦ « }| dd¦ « }| dd… dk r| ›d|›�S | dd… dk rQ|d dk rDd} dt |d ¦ « dz |dd… fz }dddœ}|d|t j z z }nÂ| dd… dk rddlm } |¦ « S | dd … d!k rMd!} t j d"t j ¦ « }| |¦ « }|r| ¦ « }nI| dd … d#k r;ddl} ddl} | | j ¦ « | ||¦ « \ } }}| ›d|›d|›�S )$aú Return a string that identifies the current platform. This is used mainly to distinguish platform-specific build directories and platform-specific built distributions. Typically includes the OS name and version and the architecture (as supplied by 'os.uname()'), although the exact information included depends on the OS; eg. on Linux, the kernel version isn't particularly important. Examples of returned values: linux-i586 linux-alpha (?) solaris-2.6-sun4u Windows will return one of: win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) win32 (all others - specifically, sys.platform is returned) For other non-POSIX platforms, currently just returns 'sys.platform'. ÚntÚamd64ú win-amd64z(arm)ú win-arm32z(arm64)z win-arm64Ú_PYTHON_HOST_PLATFORMÚposixÚunameú/Ú ú Ú_ú-Né ÚlinuxÚsunosr Ú5Úsolarisz%d.%sé é Ú32bitÚ64bit)iÿÿÿl ÿÿÿÿ z.%sÚaix)Úaix_platformé Úcygwinz[\d.]+Údarwin)ÚosÚnameÚsysÚversionÚlowerÚplatformÚenvironÚhasattrr ÚreplaceÚintÚmaxsizeÚ_aix_supportr ÚreÚcompileÚASCIIÚmatchÚgroupÚ_osx_supportÚdistutils.sysconfigÚget_platform_osxÚ sysconfigÚget_config_vars)ÚosnameÚhostÚreleaser&