/usr/lib64/python3.9/distutils/__pycache__
Edit: /usr/lib64/python3.9/distutils/__pycache__/util.cpython-39.pyc (15590B)
a
´i±Q ã @ s d Z ddlZddlZddlZddlZddlZddlmZ ddl m
Z
ddlmZ ddl
mZ ddlmZ dd „ Zd
d„ Zdd
„ Zdd„ Zdadd„ Zdd„ Zd*dd„Zd a aadd„ Zdd„ Zd+dd„Zdd„ Zd,d d!„Zd"d#„ Z d-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 jdkrFdtj ¡ v rdS dtj ¡ v r.dS dtj ¡ v r@dS tjS dt jv rZt jd S t jd ksntt d
ƒsttjS t ¡ \} }}}}| ¡ dd¡} | d
d¡}| dd¡}| dd… dkrÊd| |f S | dd… dk�r,|d dk�rÌd} dt
|d ƒd |dd… f }dddœ}|d|tj 7 }n | dd… dk�rPdd lm
} |ƒ S | dd!… d"k�rŽd"} t d#tj¡}| |¡}|�rÌ| ¡ }n>| dd!… d$k�rÌ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'.
ÚntZamd64ú win-amd64z(arm)ú win-arm32z(arm64)z win-arm64Z_PYTHON_HOST_PLATFORMÚposixÚunameú/Ú ú Ú_ú-Né Úlinuxz%s-%sZsunosr Ú5Zsolarisz%d.%sé é Z32bitZ64bit)iÿÿÿl ÿÿÿÿ z.%sZaix)Úaix_platformé Úcygwinz[\d.]+Údarwinz%s-%s-%s)ÚosÚnameÚsysÚversionÚlowerÚplatformÚenvironÚhasattrr ÚreplaceÚintÚmaxsizeZ_aix_supportr ÚreÚcompileÚASCIIÚmatchÚgroupÚ_osx_supportZdistutils.sysconfigZget_platform_osxZ sysconfigZget_config_vars)ZosnameÚhostÚreleaser ÚmachineZbitnessr Zrel_reÚmr* Ú distutils© r0 ú&/usr/lib64/python3.9/distutils/util.pyÚget_host_platform sP
þ
r2 c C s8 t jdkr.ddddœ} | t j d¡¡p,tƒ S tƒ S d S )Nr Úwin32r r )Zx86Zx64ZarmZVSCMD_ARG_TGT_ARCH)r r Úgetr r2 )ZTARGET_TO_PLATr0 r0 r1 Úget_platformb s
ýr5 c C sz t jdkr| S | s| S | d dkr.td| ƒ‚| d dkrFtd| ƒ‚| d¡}d|v rd| d¡ qP|snt jS t jj|Ž S )aÎ Return 'pathname' as a name that will work on the native filesystem,
i.e. split it on '/' and put it back together again using the current
directory separator. Needed because filenames in the setup script are
always supplied in Unix style, and have to be converted to the local
convention before we can actually use them in the filesystem. Raises
ValueError on non-Unix-ish systems if 'pathname' either starts or
ends with a slash.
r r zpath '%s' cannot be absoluteéÿÿÿÿzpath '%s' cannot end with '/'Ú.)r ÚsepÚ
ValueErrorÚsplitÚremoveÚcurdirÚpathÚjoin)ÚpathnameÚpathsr0 r0 r1 Úconvert_pathm s
rA c C sŽ t jdkr