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
R\¬Qc@sdZddlZddlZddlZddlZddlZddlmZmZddlm    Z    m
Z
m Z m Z ddl Z ddl mZmZmZmZmZmZmZmZmZmZddlZdejfd„ƒYZd„Zed    kreƒndS(
sTests for sysconfig.iÿÿÿÿN(tcopytdeepcopy(t run_unittesttTESTFNtunlinkt get_attribute(
t    get_pathst get_platformtget_config_varstget_pathtget_path_namest_INSTALL_SCHEMESt_get_default_schemet _expand_varstget_scheme_namestget_config_vart TestSysConfigcBsªeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z    d„Z
d    „Z d
„Z d „Z d „Zd „Zejejdkdƒd„ƒZRS(cCsùtt|ƒjƒtj|_d|_tt    dƒrVt    j
|_
t    j
ƒ|_ nd|_
d|_ |j t    _
t    j |_ tj|_tj|_t    j|_t    jj|_t    jj|_t    jj|_ttjƒ|_tt    jƒ|_dS(sMake a copy of sys.pathtunameN(tsuperRtsetUptsystpathtsys_pathtNonetmakefilethasattrtosRt_unamet
_get_unametnametplatformtversiontseptjointisabst
splitdriveRt    sysconfigt _CONFIG_VARSt _config_varsRtenviront old_environ(tself((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyRs$                   cCsa|jtj(|jdk    r/tj|jƒn|jƒ|jdk    rW|jt_nt`|j    t_    |j
t_
|j t_ |j t_ |j tj_ |jtj_|jtj_t|jƒt_xE|jjƒD]4\}}tjj|ƒ|krÜ|tj|<qÜqÜWx3tjjƒD]"}||jkr$tj|=q$q$Wtt|ƒjƒdS(sRestore sys.pathN(RRRRRRRt_cleanup_testfnRRRRR R!R"R#RR&R$R%R(titemsR'tgettkeysRRttearDown(R)tkeytvalue((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyR.-s, 
    cCs ||_dS(N(R(R)R((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyt
_set_unameIscCs|jS(N(R(R)((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyRLscCsNt}tjj|ƒr(tj|ƒn"tjj|ƒrJtj|ƒndS(N(RRRtisfiletremovetisdirtshutiltrmtree(R)R((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyR*Os
cCs|jtƒtjƒdS(N(t assertEqualR
R$t _SCHEME_KEYS(R)((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyttest_get_path_namesVscCsatƒ}tƒ}t|dƒ}|jƒ}|jƒ|jƒ}|jƒ|j||ƒdS(N(RR R RR+tsortR7(R)tschemetdefault_schemetwanted((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyttest_get_pathsYs         
 
cCs9x2tD]*}x!t|D]}t||ƒ}qWqWdS(N(R R    (R)R;Rtres((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyt test_get_pathcs cCs*tƒ}|j|tƒ|j|ƒdS(N(RtassertIsInstancetdictt
assertTrue(R)tcvars((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyttest_get_config_varsis    cCsBdt_dt_dt_|jtƒdƒdt_dt_dt_|jtƒdƒdt_dt_dt_|jtƒdƒdt_d    t_d
t_|jd3ƒtj    t
ƒƒdt
ƒd<dt
ƒd<tj }z<dt_ |jtƒdƒdt_ |jtƒdƒWd|t_ X|jd4ƒtj    t
ƒƒdt
ƒd<dt
ƒd<tj }z<dt_ |jtƒdƒdt_ |jtƒdƒWd|t_ Xtj    t
ƒƒdt
ƒd<dt
ƒd<|jtƒdƒtj    t
ƒƒdt
ƒd<|jtƒdƒtj    t
ƒƒd t
ƒd<|jtƒd!ƒtj    t
ƒƒd"t
ƒd<|jtƒd#ƒtj    t
ƒƒd$t
ƒd<|jtƒd%ƒxLd5D]D}tj    t
ƒƒd)|ft
ƒd<|jtƒd*|fƒq»Wdt_d+t_d,t_|jd6ƒ|jtƒd2ƒdS(7Ntnts>2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)]twin32s>2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Amd64)]s    win-amd64s@2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Itanium)]swin-ia64tposixsU2.5 (r25:51918, Sep 19 2006, 08:49:13) 
[GCC 4.0.1 (Apple Computer, Inc. build 5341)]tdarwintDarwintmacziades8.11.1s]Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386tPowerPCs10.3tMACOSX_DEPLOYMENT_TARGETsF-fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypestCFLAGSiÿÿÿsmacosx-10.3-ppcIÿÿÿÿÿÿÿsmacosx-10.3-ppc64ti386smacosx-10.3-i386smacosx-10.3-x86_64s10.4sy-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3smacosx-10.4-fats|-arch x86_64 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3smacosx-10.4-intels†-arch x86_64 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3smacosx-10.4-fat3s’-arch ppc64 -arch x86_64 -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3smacosx-10.4-universals}-arch x86_64 -arch ppc64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3smacosx-10.4-fat64tppctx86_64tppc64sm-arch %s -isysroot /Developer/SDKs/MacOSX10.4u.sdk  -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3smacosx-10.4-%ssV2.3.5 (#1, Jul  4 2007, 17:28:59) 
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]tlinux2tLinuxtaglaes2.6.21.1dedibox-r7s #1 Mon Apr 30 17:25:38 CEST 2007ti686s
linux-i686(RJRKs8.11.1s]Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386sPowerPC(RJRKs8.11.1s]Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386si386(sppcsi386sx86_64sppc64(RTRUs2.6.21.1dedibox-r7s #1 Mon Apr 30 17:25:38 CEST 2007RV( RRRRRR7RR1t _osx_supportt_remove_original_valuesRtmaxint(R)RYtarch((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyttest_get_platformnsˆ                                                              
              
                   cCs,tjƒ}|jtjj|ƒ|ƒdS(N(R$tget_config_h_filenameRCRRR2(R)tconfig_h((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyttest_get_config_h_filenameís cCsd    }|jtƒ|ƒdS(
NRFtnt_usertos2tos2_hometosx_framework_usert
posix_homet posix_prefixt
posix_user(sntsnt_usersos2sos2_homesosx_framework_users
posix_homes posix_prefixs
posix_user(R7R(R)R=((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyttest_get_scheme_namesñscCs~ttdƒ}d„}tjjtjƒ}tjjtƒ}|||ƒz |j||ƒ||ƒƒWdt    |ƒXdS(NtsymlinkcSs1|ddg}tj|dtjƒ}|jƒS(Ns-cs0import sysconfig; print sysconfig.get_platform()tstdout(t
subprocesstPopentPIPEt communicate(tpythontcmdtp((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyR,ùs    (
RRRtrealpathRt
executabletabspathRR7R(R)RgR,trealtlink((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyt test_symlinkös      cCsµtdƒ}tdƒ}tjtjk}x„d
D]|}t|dƒ}|r|jtjtjƒ}|jtjtjƒ}nt|dƒ}|j||j||d    ƒƒq1WdS( Ntbasetuserbasetstdlibt
platstdlibtpurelibtplatlibRdRei(sstdlibs
platstdlibspurelibsplatlib(RRtprefixt exec_prefixR    treplaceR7(R)RvtusertadaptRt global_patht    user_path((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyttest_user_similars   RIstest only relevant on MacOSXc Csntjƒ}tjjƒ}d|kr1|d=ntddƒ7}tjtj    ddgdtj
d|d|ƒ}WdQX|j ƒd    j ƒ}|j d
ƒ}|jƒ}|j|d    ƒ|j||ƒtjjƒ}d |d<tjtj    ddgdtj
dtdƒd|ƒ}|j ƒd    j ƒ}|j d
ƒ}|jƒ}|j|d    ƒ|j||ƒdS( NRMs    /dev/nulltws-cs1import sysconfig; print(sysconfig.get_platform())Rhtstderrtenvisutf-8s10.1(R$RRR'RtopenRiRjRRqRkRltstriptdecodetwaitR7(R)t my_platformR†t
devnull_fpRot test_platformtstatus((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyttest_platform_in_subprocesss:  
             
                  (t__name__t
__module__RR.R1RR*R9R>R@RER[R^RfRuRƒtunittestt
skipUnlessRRR(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyRs                            
                           cCsttƒdS(N(RR(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyt    test_mainDst__main__(t__doc__R’RRR5RiRRttest.test_supportRRRRR$RRRR    R
R R R RRRWtTestCaseRR”R(((s[/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_sysconfig.pyt<module>s     " F ÿ2