B b^ªtÍq\×ã @ s d Z ddlZddlZddlZddlZddlZddlmZ ddl m Z ddlmZ ddl mZ ddlmZ dd „ Zd d„ Zdd „ Zdadd„ Zdd„ Zd(dd„Zd a aadd„ Zdd„ Zd)dd„Zdd„ Zd*dd„Zd d!„ Zd+d"d#„Z d,d$d%„Z!G d&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 C s² t jdkr"dtj ¡ krdS tjS dt jkr6t jd S t jdksJtt dƒsPtjS t ¡ \} }}}}| ¡ dd¡} | d d ¡}| dd¡}| dd … dkr¦d| |f S | dd … dkr|d dkr¤d} dt |d ƒd |dd… f }dddœ}|d|tj 7 }nœ| dd… dkr(d| ||f S | dd… dkrfd} t dtj¡}| |¡}|r¤| ¡ }n>| dd… d kr¤ddl}ddl} | | j ¡ | ||¡\} }}d!| ||f 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'. ÚntZamd64z win-amd64Z_PYTHON_HOST_PLATFORMÚposixÚunameú/Ú ú Ú_ú-Né Zlinuxz%s-%sZsunosr Ú5Zsolarisz%d.%sé é Z32bitZ64bit)iÿÿÿl ÿÿÿÿ z.%sZaixz%s-%s.%sé Úcygwinz[\d.]+Údarwinz%s-%s-%s)ÚosÚnameÚsysÚversionÚlowerÚplatformÚenvironÚhasattrr ÚreplaceÚintÚmaxsizeÚreÚcompileÚASCIIÚmatchÚgroupÚ_osx_supportZdistutils.sysconfigZget_platform_osxZ sysconfigZget_config_vars) ZosnameZhostÚreleaser ÚmachineZbitnessZrel_reÚmr&