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
129
130
131
132
133
134
135
136
137
138
139
140
\\¬Qc@sGdZdZddlZddlZddlZddlZddlTddlmZm    Z    ddl
m Z ddl Tddl mZmZddlmZdd    lmZdd
lmZdd lmZejd krejjd ƒdkrddlmZeeƒƒZnejdƒZ d„Z!de fd„ƒYZ"dS(s¶distutils.command.build_ext
 
Implements the Distutils 'build_ext' command, for building extension
modules (currently limited to C extensions, should accommodate C++
extensions ASAP).s$Id$iÿÿÿÿN(t*(t    USER_BASEt    USER_SITE(tCommand(tcustomize_compilertget_python_version(t newer_group(t    Extension(t get_platform(tlogtnttGCCi(tget_build_versions3^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$cCsddlm}|ƒdS(Niÿÿÿÿ(tshow_compilers(tdistutils.ccompilerR (R ((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pyR !st    build_extcBs?eZdZdejZdFdGdd    d
eƒfd d d dfdddefdHdIdJdddefdKdLdMdNdOdQdRdSdTgZd d$d'd-d3gZ    d5dPd6e
fgZ d7„Z d8„Z d9„Zd:„Zd;„Zd<„Zd=„Zd>„Zd?„Zd@„ZdA„ZdB„ZdC„ZdD„ZdE„ZRS(Us8build C/C++ extensions (compile/link to build directory)s (separated by '%s')s
build-lib=tbs(directory for compiled extension moduless build-temp=tts1directory for temporary files (build by-products)s
plat-name=tps>platform name to cross-compile for, if supported (default: %s)tinplacetis=ignore build-lib and put compiled extensions into the source s,directory alongside your pure Python moduless include-dirs=tIs.list of directories to search for header filessdefine=tDsC preprocessor macros to definesundef=tUs!C preprocessor macros to undefines
libraries=tls!external C libraries to link withs library-dirs=tLs.directories to search for external C librariessrpath=tRs7directories to search for shared C libraries at runtimes link-objects=tOs2extra explicit link objects to include in the linktdebugtgs'compile/link with debugging informationtforcetfs2forcibly build everything (ignore file timestamps)s    compiler=tcsspecify the compiler typesswig-cpps)make SWIG create C++ files (default is C)s
swig-opts=s!list of SWIG command line optionssswig=spath to the SWIG executabletusers#add user include, library and rpaths help-compilerslist available compilerscCs¸d|_d|_d|_d|_d|_d|_d|_d|_d|_    d|_
d|_ d|_ d|_ d|_d|_d|_d|_d|_d|_d|_dS(Ni(tNonet
extensionst    build_libt    plat_namet
build_tempRtpackaget include_dirstdefinetundeft    librariest library_dirstrpatht link_objectsRRtcompilertswigtswig_cppt    swig_optsR!(tself((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pytinitialize_optionsms(                                                                            c     Cs"ddlm}|jdd1d2d3d4d5d6ƒ|jdkrP|jj|_n|jj|_|j    ƒ}|j    d
d ƒ}|j
dkr¤|jj
p›g|_
nt |j
t ƒrÑ|j
j tjƒ|_
n|j
j|ƒ||kr|j
j|ƒn|jd ƒ|jdkr(g|_n|jdkrCg|_n3t|jƒtkrvtj |jtjƒ|_n|jdkr‘g|_n3t|jƒtkrÄtj |jtjƒ|_ntjd kr{tjjdƒdkr{|jjtjjtjdƒƒ|jr4tjj|j dƒ|_ ntjj|j dƒ|_ |j
jtjjtjdƒƒt!dkrë|j"dkr•d}n |j"d}tjjtjdƒ}|rØtjj||ƒ}n|jj|ƒq{t!dkr|jjtjjtjddƒƒq{t!dkrS|jjtjjtjddƒƒq{|jjtjjtjddƒƒntjdkr¯|jjtjjtjdƒƒntj#d  d!ksütj#d  d"ksütj#dkretjjdƒdkretj$j%tjjtjd#ƒƒrR|jjtjjtj&d$d%t'ƒd&ƒƒqe|jjd'ƒn|j(d(ƒtj#j%d)ƒs¨tj#j%d*ƒs¨tj#j%d+ƒr
|j(d(ƒr
tj$j%tjjtjd#ƒƒr÷|jj|j(d,ƒƒq
|jjd'ƒn|j)r=|j)j d-ƒ}t*d.„|ƒ|_)n|j+r^|j+j d-ƒ|_+n|j,dkryg|_,n|j,j d/ƒ|_,|j-rtjjt.d0ƒ}tjjt.d$ƒ}tjj/|ƒræ|j
j|ƒntjj/|ƒr|jj|ƒ|jj|ƒqndS(7Niÿÿÿÿ(t    sysconfigtbuildR$R&R/RRR%t plat_specificiR+R
R itlibstDebugtReleasetPCi    twin32titPCbuildisVS8.0isVS7.1tVC6tos2tConfigitcygwintatheostbintlibtpythontconfigt.tPy_ENABLE_SHAREDtlinuxtgnutsunostLIBDIRt,cSs
|dfS(Nt1((tsymbol((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pyt<lambda>st tinclude(s    build_libs    build_lib(s
build_temps
build_temp(scompilerscompiler(sdebugsdebug(sforcesforce(s    plat_names    plat_name(0t    distutilsR5tset_undefined_optionsR'R"t distributiont ext_packaget ext_modulesR#tget_python_incR(t
isinstancetstrtsplittostpathseptappendtensure_string_listR+R,ttypet
StringTypetstringR-tnametsystversiontfindtpathtjoint exec_prefixRR&t MSVC_VERSIONR%tplatformt
executablet
startswithtprefixRtget_config_varR)tmapR*R2R!Rtisdir(    R3R5t
py_includetplat_py_includetsuffixtnew_libtdefinest user_includetuser_lib((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pytfinalize_options„sª          '"    "        %&'$
  $$             c
Csddlm}|jsdS|jjƒrm|jdƒ}|jj|jƒpSgƒ|j    j
|j ƒn|d|j d|j d|jd|jƒ|_ t|j ƒtjdkrá|jtƒkrá|j j|jƒn|jdk    r|j j|jƒn|jdk    rEx-|jD]\}}|j j||ƒqWn|jdk    r{x$|jD]}|j j|ƒq^Wn|jdk    r |j j|jƒn|j    dk    rÅ|j j|j    ƒn|jdk    rê|j j |jƒn|j!dk    r|j j"|j!ƒn|j#ƒdS(    Niÿÿÿÿ(t new_compilert
build_clibR/tverbosetdry_runRR
($RR{R#RVthas_c_librariestget_finalized_commandR+textendtget_library_namesR,R_R|R/R}R~RRR]RdR%Rt
initializeR(R"tset_include_dirsR)t define_macroR*tundefine_macrot set_librariestset_library_dirsR-tset_runtime_library_dirsR.tset_link_objectstbuild_extensions(R3R{R|Rdtvaluetmacro((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pytruns>             !c
   Cs!t|tƒstd‚nxÿt|ƒD]ñ\}}t|tƒrIq(nt|tƒ skt|ƒdkrwtd‚n|\}}tjd|ƒt|t    ƒo¯t
j |ƒs¾td‚nt|t ƒsÙtd‚nt||dƒ}x<dD]4}|j |ƒ}|dk    rót|||ƒqóqóW|j dƒ|_d|krYtjdƒn|j dƒ}|rg|_g|_xŒ|D]}    t|    tƒo«t|    ƒdksºtd‚nt|    ƒdkrã|jj|    dƒq‡t|    ƒdkr‡|jj|    ƒq‡q‡Wn|||<q(WdS(s¬Ensure that the list of extensions (presumably provided as a
        command option 'extensions') is valid, i.e. it is a list of
        Extension objects.  We also support the old-style list of 2-tuples,
        where the tuples are (ext_name, build_info), which are converted to
        Extension instances here.
 
        Raise DistutilsSetupError if the structure is invalid anywhere;
        just returns otherwise.
        s:'ext_modules' option must be a list of Extension instancesisMeach element of 'ext_modules' option must be an Extension instance or 2-tuplesuold-style (ext_name, build_info) tuple found in ext_modules for extension '%s'-- please convert to Extension instancesRfirst element of each tuple in 'ext_modules' must be the extension name (a string)sOsecond element of each tuple in 'ext_modules' must be a dictionary (build info)tsourcesR(R,R+t extra_objectstextra_compile_argstextra_link_argsR-tdef_files9'def_file' element of build info dict no longer supportedtmacrosis9'macros' element of build info dict must be 1- or 2-tupleiN(s include_dirss library_dirss    librariess extra_objectssextra_compile_argssextra_link_args(ii(RZtlisttDistutilsSetupErrort    enumerateRttupletlenR    twarnR[textension_name_retmatchtdicttgetR"tsetattrtruntime_library_dirst define_macrost undef_macrosR_(
R3R#Rtexttext_namet
build_infotkeytvalR”R((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pytcheck_extensions_listXsT
    "                 
           !    cCs>|j|jƒg}x!|jD]}|j|jƒq W|S(N(R¨R#RR(R3t    filenamesR£((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pytget_source_files¦s
cCsG|j|jƒg}x*|jD]}|j|j|jƒƒq W|S(N(R¨R#R_tget_ext_fullpathRd(R3toutputsR£((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pyt get_outputs°s
cCs5|j|jƒx|jD]}|j|ƒqWdS(N(R¨R#tbuild_extension(R3R£((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pyR‹¾sc
Csþ|j}|dks-t|ƒttfkrHtddd|j‚nt|ƒ}|j|jƒ}||j    }|j
p‹t ||dƒs¥t j d|jƒdSt jd|jƒ|j||ƒ}|jpÖg}|j}x!|jD]}|j|fƒqíW|jj|d|jd|d    |jd
|j d |d |j    ƒ}||_|jro|j|jƒn|jp{g}|jp–|jj|ƒ}    |jj||d |j|ƒd|j d|j!d |d|j"|ƒd
|j d|jd|    ƒdS(Ns*in 'ext_modules' option (extension '%s'), s&'sources' must be present and must be sa list of source filenamestnewers$skipping '%s' extension (up-to-date)sbuilding '%s' extensiont
output_dirR”R(Rtextra_postargstdependsR+R,R texport_symbolsR&t target_lang(#RR"RatListTypet    TupleTypeR–RdR•R«R²RRR    Rtinfot swig_sourcesR‘R¡R¢R_R/tcompileR&R(t_built_objectsRRR’tlanguagetdetect_languagetlink_shared_objectt get_librariesR,R tget_export_symbols(
R3R£Rtext_pathR²t
extra_argsR”R*tobjectsR»((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pyR®ÅsN    $  
            
                            c    Cs£g}g}i}|jr+tjdƒn|jsRd|jksRd|jkr[d}nd}xr|D]j}tjj|ƒ\}}    |    dkrÅ|j|d|ƒ|j|ƒ|d||<qh|j|ƒqhW|sà|S|jpò|j    ƒ}
|
dg} | j
|jƒ|jr*| jdƒn|jsWx!|jD]} | j| ƒq=WnxE|D]=}||} tj d    || ƒ|j | d
| |gƒq^W|S( süWalk the list of source files in 'sources', looking for SWIG
        interface (.i) files.  Run SWIG on all that are found, and
        return a modified 'sources' list with SWIG source files replaced
        by the generated C (or C++) files.
        s/--swig-cpp is deprecated - use --swig-opts=-c++s-c++s.cpps.cs.it_wrapiÿÿÿÿs-pythonsswigging %s to %ss-o( R1R    RšR2R]RhtsplitextR_R0t    find_swigRR·tspawn(R3Rt    extensiont new_sourcesR¸t swig_targetst
target_exttsourcetbaseR£R0tswig_cmdtottarget((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pyR¸s>                     
cCstjdkrdStjdkrixgd D]5}tjjd|dƒ}tjj|ƒr)|Sq)WdSn#tjd    kr|dStd
tj‚d S( s›Return the name of the SWIG executable.  On Unix, this is
        just "swig" -- it should be in the PATH.  Tries a bit harder on
        Windows.
        tposixR0R
s1.3s1.2s1.1s    c:\swig%ssswig.exeR@s>I don't know how to find (much less run) SWIG on platform '%s'N(s1.3s1.2s1.1(R]RdRhRitisfiletDistutilsPlatformError(R3tverstfn((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pyRÅRs c    Csútjdtjdƒ}|j|ƒ}|j|ƒ}|jdƒ}|j|ƒ}tjj|ƒd}|j    s§tjj
|d |gŒ}tjj
|j |ƒSdj
|dd!ƒ}|j dƒ}tjj |j|ƒƒ}tjj
||ƒS(s¡Returns the path of the filename for a given extension.
 
        The file is located in `build_lib` or directly in the package
        (inplace option).
        t/s..RHiÿÿÿÿitbuild_py(Rct    maketransR]tsept    translatetget_ext_fullnameR\tget_ext_filenameRhRRiR$R€tabspathtget_package_dir(    R3R¤tall_dotstfullnametmodpathtfilenameR'RÖt package_dir((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pyR«ss    cCs&|jdkr|S|jd|SdS(sSReturns the fullname of a given extension name.
 
        Adds the `package.` prefixRHN(R'R"(R3R¤((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pyRړscCsªddlm}tj|dƒ}tjdkrZ|t|ƒdd |t|ƒd<n|dƒ}tjdkr–|jr–tjj    |Œd    |Stjj    |Œ|S(
s¦Convert the name of an extension (eg. "foo.bar") into the name
        of the file from which it will be loaded (eg. "foo/bar.so", or
        "foo\bar.pyd").
        iÿÿÿÿ(RpRHR@iitSOR
t_d(
tdistutils.sysconfigRpRcR\R]RdR™RRhRi(R3R¤RpRÀtso_ext((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pyRۜs) cCsCd|jjdƒd}||jkr<|jj|ƒn|jS(sReturn the list of symbols that a shared extension has to
        export.  This either uses 'ext.export_symbols' or, if it's not
        provided, "init" + module_name.  Only relevant on Windows, where
        the .pyd file (DLL) must export the module "init" function.
        tinitRHiÿÿÿÿ(RdR\R³R_(R3R£t initfunc_name((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pyR¿¬scCsƒ|jjdkr(ddlm}d}|jr>|d}n||jdƒg}x@|jdƒjƒD])}|jdƒrj|j|d    ƒqjqjWx@|jd
ƒjƒD])}|jdƒr­|j|d    ƒq­q­Wx@|jd ƒjƒD])}|jdƒrð|j|d    ƒqðqðW|j    |St
j d kr¯dd l m }t|j|ƒs¥d}|jru|d}n|t
jd?t
jd?d@f}|j    |gS|j    SnÐt
j dkrôd}|t
jd?t
jd?d@f}|j    |gSt
j d dkr=d}|t
jd?t
jd?d@f}|j    |gSt
j d dkróddlm}d}|t
jd?t
jd?d@f}g}xM|jd ƒjƒD]6}|jdƒrÍ|j|d    ƒq¤|j|ƒq¤W|j    |dg|St
j dkr    |j    St
j d dkr#|j    Sddlm}|jdƒrxd}|t
jd?t
jd?d@f}|j    |gS|j    SdS(sÜReturn the list of libraries to link against when building a
        shared extension.  On most platforms, this is just 'ext.libraries';
        on Windows and OS/2, we add the Python library (eg. python20.dll).
        tmingw32iÿÿÿÿ(R5spython%sRätVERSIONt
BLDLIBRARYs-litMODLIBStSHLIBSR<(t MSVCCompilers
python%d%diiiÿtos2emxiRBs python%d.%dRCtmtdarwinitaixRIN(R/t compiler_typeRTR5RRpR\RnR_R+ReRltdistutils.msvccompilerRîRZt
hexversion(R3R£R5ttemplatetextraRERît    pythonlib((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pyR¾·st           
(s
build-lib=Rs(directory for compiled extension modules(s build-temp=Rs1directory for temporary files (build by-products)(sdefine=RsC preprocessor macros to define(sundef=Rs!C preprocessor macros to undefine(s
libraries=Rs!external C libraries to link with(srpath=Rs7directories to search for shared C libraries at runtime(s link-objects=Rs2extra explicit link objects to include in the link(sdebugRs'compile/link with debugging information(sforceRs2forcibly build everything (ignore file timestamps)(s    compiler=R sspecify the compiler typeN(sswig-cppNs)make SWIG create C++ files (default is C)(s
swig-opts=Ns!list of SWIG command line options(sswig=Nspath to the SWIG executable(suserNs#add user include, library and rpath(t__name__t
__module__t descriptionR]R^tsep_byRR"t user_optionstboolean_optionsR t help_optionsR4RzRŽR¨RªR­R‹R®R¸RÅR«RÚRÛR¿R¾(((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pyR&st 
 
 
            ”    @    N    
           S    :    !                      (#t__doc__t __revision__ReR]RctrettypestsiteRRtdistutils.coreRtdistutils.errorsRåRRtdistutils.dep_utilRtdistutils.extensionRtdistutils.utilRRTR    RdRfRgRôR tintRkR¹R›R R(((sc/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/build_ext.pyt<module>s$0
 
'