tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[\¬Qc@sdZdZddlZddlZddlZddlZddlmZejj    ej
ƒZ ejj    ej ƒZ ejjejjejƒƒZejdkrædedjƒkræejjejjeejjƒƒZnejdkr>ded    jƒkr>ejjejjeejjejjƒƒZnejdkr–d
ed jƒkr–ejjejjeejjejjƒƒZnd ejkrÁejj    ejd ƒZnd „ZeƒZd„Zddd„Zdddd„Zd„Zd„Zd„Zdd„Z ej!dƒZ"ej!dƒZ#ej!dƒZ$dd„Z%d„Z&da'd„Z(d„Z)d„Z*d„Z+d„Z,dS( sProvide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.
 
Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>
s$Id$iÿÿÿÿN(tDistutilsPlatformErrortnttpcbuildiøÿÿÿs\pc\viöÿÿÿs\pcbuild\amd64iòÿÿÿt_PYTHON_PROJECT_BASEcCs=x6dD].}tjjtjjtd|ƒƒrtSqWtS(Ns
Setup.dists Setup.localtModules(s
Setup.dists Setup.local(tostpathtisfiletjoint project_basetTruetFalse(tfn((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pyt _python_build2s $cCs tjd S(s–Return a string containing the major and minor Python version,
    leaving off the patchlevel.  Sample return values could be '1.5'
    or '2.2'.
    i(tsystversion(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pytget_python_version:sicCs|d kr!|rtpt}ntjdksHtjjdƒdkrÄtr§tj    j
tj    j tj ƒƒ}|ry|Stj    j tdƒdƒ}tj    j|ƒSntj    j |ddtƒƒStjdkrætj    j |dƒStjd    krtj    j |dƒStd
tjƒ‚d S( sšReturn the directory containing installed Python header files.
 
    If 'plat_specific' is false (the default), this is the path to the
    non-platform-specific header files, i.e. Python.h and so on;
    otherwise, this is the path to platform-specific header files
    (namely pyconfig.h).
 
    If 'prefix' is supplied, use it instead of sys.prefix or
    sys.exec_prefix -- i.e., ignore 'plat_specific'.
    tposixtGCCitsrcdirtIncludetincludetpythonRtos2sFI don't know where Python installs its C header files on platform '%s'N(tNonet EXEC_PREFIXtPREFIXRtnameRRtfindt python_buildRtdirnametabspatht
executableRtget_config_vartnormpathRR(t plat_specifictprefixtbasetincdir((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pytget_python_incBs" '!cCs3|d kr!|rtpt}ntjdksHtjjdƒdkr‡tjj    |ddt
ƒƒ}|rq|Stjj    |dƒSn¨tjdkrÛ|r¯tjj    |dƒSt
ƒd    krÂ|Stjj    |ddƒSnTtjd
kr|rtjj    |dƒStjj    |ddƒSnt d tjƒ‚d S( sIReturn the directory containing the Python library (standard or
    site additions).
 
    If 'plat_specific' is true, return the directory containing
    platform-specific modules, i.e. any module from a non-pure-Python
    module distribution; otherwise, return the platform-shared library
    directory.  If 'standard_lib' is true, return the directory
    containing standard Python library modules; otherwise, return the
    directory for site-specific modules.
 
    If 'prefix' is supplied, use it instead of sys.prefix or
    sys.exec_prefix -- i.e., ignore 'plat_specific'.
    RRitlibRs site-packagesRtLibs2.2Rs?I don't know where Python installs its library on platform '%s'N( RRRRRRRRRRRR(R#t standard_libR$t    libpython((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pytget_python_libjs* ' cCsÔd    }|jdkrt}n3|jdkrQtjjdƒdkrQt}qQn|tkrÐtjdkr§tjddƒs§dd    l    }|j
tƒd
td<q§nt d d d ddddddƒ    \    }}}}}}}    }
} d    } d t j kr t j d }nd t j kr*t j d }ndt j krIt j d}ndt j krht j d} n
|d} dt j kr™|dt j d}ndt j krÕ|dt j d}|dt j d}ndt j kr&| dt j d} |dt j d}|dt j d}ndt j krEt j d}
ndt j krl|
dt j d}n|
d| }|d|}|jd| d|d|d|d|d|d|d|ƒ|    |_nd    S( s„Do any platform-specific customization of a CCompiler instance.
 
    Mainly needed on Unix, so we can plug in the information that
    varies across Unices and is stored in Python's Makefile.
 
    NOTE: (known limitation of python build/install system)
    In cross-build environment make macros like CC and LDSHARED
    contain cross-compiler/linker instead of host compiler/linker.
    tunixtmingw32RitdarwintCUSTOMIZED_OSX_COMPILERtiÿÿÿÿNR
tCCtCXXtOPTtCFLAGStCCSHAREDtLDSHAREDtSOtARtARFLAGStCPPs -EtLDFLAGSt tCPPFLAGSt preprocessortcompilert compiler_sot compiler_cxxt    linker_sot
linker_exetarchiver(Rt compiler_typeR
RRRtplatformt _config_varstgett _osx_supporttcustomize_compilertget_config_varsRtenvirontset_executablestshared_lib_extension(R@t posix_buildRJtcctcxxtopttcflagstccsharedtldsharedtso_exttartar_flagstnewcctcppREtcc_cmd((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pyRK™sb
      
   $
    cCsŽtrNtjdkrEtjjdƒdkrEtjjtdƒ}q]t}nt    ddƒ}t
ƒdkrud}nd    }tjj||ƒS(
s2Return full pathname of installed pyconfig.h file.RRitPCR#is2.2sconfig.hs
pyconfig.h( RRRRRRRRR    R'R(tinc_dirtconfig_h((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pytget_config_h_filenameæs'        cCsDtrtjjtdƒStddddƒ}tjj|ddƒS(sAReturn full pathname of installed Makefile from the Python build.tMakefileR#iR*tconfig(RRRRR    R,(tlib_dir((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pytget_makefile_filenameøscCsÜ|dkri}ntjdƒ}tjdƒ}x¢|jƒ}|sLPn|j|ƒ}|rª|jddƒ\}}yt|ƒ}Wntk
rœnX|||<q6|j|ƒ}|r6d||jdƒ<q6q6|S(sÌParse a config.h-style file.
 
    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    s"#define ([A-Z][A-Za-z0-9_]+) (.*)
s&/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/
iiiN(Rtretcompiletreadlinetmatchtgrouptintt
ValueError(tfptgt    define_rxtundef_rxtlinetmtntv((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pytparse_config_hs(        s"([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)s\$\(([A-Za-z][A-Za-z0-9_]*)\)s\${([A-Za-z][A-Za-z0-9_]*)}cCs×ddlm}||ddddddƒ}|d krCi}ni}i}xÊ|jƒ}|d krnPntj|ƒ}|rR|jddƒ\}}    |    jƒ}    |    jdd    ƒ}
d
|
krÒ|    ||<qyt    |    ƒ}    Wn't
k
r |    jdd
ƒ||<qX|    ||<qRqRx^|r|xQ|j ƒD]C} || } t j | ƒp]tj | ƒ}|rn|jdƒ}t} ||kršt||ƒ}nB||kr¯t} n-|tjkrÎtj|}nd    ||<}| ru| |jƒ}| |jƒ ||} d
|kr#| || <qkyt    | ƒ} Wn!t
k
rV| jƒ|| <n X| || <|| =quq2|| =q2WqW|jƒx<|jƒD].\}}    t|    tƒr”|    jƒ||<q”q”W|j|ƒ|S( sÌParse a Makefile-style file.
 
    A dictionary containing name/value pairs is returned.  If an
    optional dictionary is passed in as the second argument, it is
    used instead of a new dictionary.
    iÿÿÿÿ(tTextFiletstrip_commentsit skip_blankst
join_linesis$$R1t$N(tdistutils.text_fileRuRRgt _variable_rxRhRitstriptreplaceRjRktkeyst _findvar1_rxtsearcht _findvar2_rxR
tstrR RRMtendtstarttclosetitemst
isinstancetupdate(R RmRuRltdonetnotdoneRpRqRrRsttmpvRtvaluetfoundtitemtaftertk((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pytparse_makefile#sl               
         
 
 cCsoxhtj|ƒptj|ƒ}|rg|jƒ\}}|d|!|j|jdƒƒ||}qPq|S(s¨Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
    'string' according to 'vars' (a dictionary mapping variable names to
    values).  Variables not present in 'vars' are silently expanded to the
    empty string.  The variable values in 'vars' should not contain further
    variable expansions; if 'vars' is the output of 'parse_makefile()',
    you're fine.  Returns a variable-expanded version of 's'.
    ii(RR€RtspanRIRi(tstvarsRqtbegRƒ((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pytexpand_makefile_varsvs.cCs'ddlm}iatj|ƒdS(s7Initialize the module as appropriate for POSIX systems.iÿÿÿÿ(tbuild_time_varsN(t_sysconfigdataR—RHRˆ(R—((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pyt _init_posix‘scCsÊtjjdƒdkr#tƒdSi}tddddƒ|d<tddddƒ|d<tddƒ|d    <d
|d <d |d <tƒjddƒ|d<tj    j
tj    j tj ƒƒ|d<|a dS(s+Initialize the module as appropriate for NTRiNR#R*itLIBDESTt
BINLIBDESTt    INCLUDEPYs.pydR8s.exetEXEt.R1tVERSIONtBINDIR(RRRR™R,R'RR}RRRRR RH(Rm((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pyt_init_ntšs
 
%cCsii}tddddƒ|d<tddddƒ|d<tddƒ|d<d|d    <d
|d <|ad S( s-Initialize the module as appropriate for OS/2R#iR*iRšR›Rœs.pydR8s.exeRN(R,R'RH(Rm((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pyt    _init_os2²s
 
cGs¼tdkr}tƒjdtjƒ}|r5|ƒniattd<ttd<tj    dkr}ddl
}|j tƒq}n|r´g}x$|D]}|j tj|ƒƒqW|StSdS(sêWith no arguments, return a dictionary of all configuration
    variables relevant for the current platform.  Generally this includes
    everything needed to build extensions and install both pure modules and
    extensions.  On Unix, this means every variable defined in Python's
    installed Makefile; on Windows and Mac OS it's a much smaller set.
 
    With arguments, return a list of values that result from looking up
    each argument in the configuration variable dictionary.
    t_init_R$t exec_prefixR/iÿÿÿÿN( RHRtglobalsRIRRRRRRGRJtcustomize_config_varstappend(targstfuncRJtvalsR((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pyRLÃs  
 
 
  cCstƒj|ƒS(s“Return the value of a single variable using the dictionary
    returned by 'get_config_vars()'.  Equivalent to
    get_config_vars().get(name)
    (RLRI(R((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pyR!és(-t__doc__t __revision__RRetstringRtdistutils.errorsRRR"R$RR¤RRRR R    RtlowerRtpardirRMR RRRR'R,RKR`RdRtRfR{RRR‘R–RHR™R¡R¢RLR!(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/sysconfig.pyt<module>
sN    !%*%%            (/    M          S                        &