관리-도구
편집 파일: unixccompiler.cpython-311.pyc
� �܋fR= � �� � d Z ddlmZ ddlZddlZddlZddlZddlZddlm Z ddl mZ ddlm Z ddlmZ dd lmZmZmZ dd lmZ ddlmZmZmZmZ d� Zd � Zd� Z G d� de� � ZdS )a9 distutils.unixccompiler Contains the UnixCCompiler class, a subclass of CCompiler that handles the "typical" Unix-style command-line C compiler: * macros defined with -Dname[=value] * macros undefined with -Uname * include search directories specified with -Idir * libraries specified with -lllib * library search directories specified with -Ldir * compile handled by 'cc' (or similar) executable with -c option: compiles .c to .o * link static library handled by 'ar' command (possibly with 'ranlib') * link shared library handled by 'cc -shared' � )�annotationsN� )� sysconfig)�log)�compiler_fixup)�newer)� CCompiler�gen_lib_options�gen_preprocess_options)�consolidate_linker_args)�CompileError�DistutilsExecError�LibError� LinkErrorc � � d}t j � | d � � dk rd}d| | v r|dz }d| | v �| d|� | |d� fS )z� For macOS, split command into 'env' portion (if any) and the rest of the linker command. >>> _split_env(['a', 'b', 'c']) ([], ['a', 'b', 'c']) >>> _split_env(['/usr/bin/env', 'A=3', 'gcc']) (['/usr/bin/env', 'A=3'], ['gcc']) r �envr �=N��os�path�basename��cmd�pivots �t/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/setuptools/_distutils/unixccompiler.py� _split_envr 0 sq � � �E� �w����A����5�(�(����S��Z����Q�J�E� �S��Z����v��v�;��E�F�F��#�#� c �| � t j � | d � � dk }| d|� | |d� fS )a AIX platforms prefix the compiler with the ld_so_aix script, so split that from the linker command. >>> _split_aix(['a', 'b', 'c']) ([], ['a', 'b', 'c']) >>> _split_aix(['/bin/foo/ld_so_aix', 'gcc']) (['/bin/foo/ld_so_aix'], ['gcc']) r � ld_so_aixNr r s r � _split_aixr B s= � � �G���S��V�$�$��3�E��v��v�;��E�F�F��#�#r c �X � t |� � }| d|� |k r|nd}| |d� S )a The linker command usually begins with the compiler command (possibly multiple elements), followed by zero or more params for shared library building. If the LDSHARED env variable overrides the linker command, however, the commands may not match. Return the best guess of the linker parameters by stripping the linker command. If the compiler command does not match the linker command, assume the linker command is just the first element. >>> _linker_params('gcc foo bar'.split(), ['gcc']) ['foo', 'bar'] >>> _linker_params('gcc foo bar'.split(), ['other']) ['foo', 'bar'] >>> _linker_params('ccache gcc foo bar'.split(), 'ccache gcc'.split()) ['foo', 'bar'] >>> _linker_params(['gcc'], ['gcc']) [] Nr )�len)� linker_cmd�compiler_cmd�c_lenr s r �_linker_paramsr&