ž «ÿfÓUc@sÖdZddlZddlZddlZddlZejejgada da da dd„Z dd„Z dd„Zd d „Zd d „Zdd d„Zdd„Zdd„Zdd„Zdd„Zddd„Zddd„Zdd„Zdd„ZGdd „d eƒZd!d"„ZGd#d$„d$eƒZd%d&„Zd'd(„Zej d)ƒZ!d*d+„Z"d,d-„Z#d.d/„Z$d0d1„Z%ej&j's°e%ƒnd2d3„Z(e)d4krÒe(ƒndS(5uæ Append module search paths for third-party packages to sys.path. **************************************************************** * This module is automatically imported during initialization. * **************************************************************** This will append site-specific paths to the module search path. On Unix (including Mac OSX), it starts with sys.prefix and sys.exec_prefix (if different) and appends lib/python/site-packages as well as lib/site-python. On other platforms (such as Windows), it tries each of the prefixes directly, as well as with lib/site-packages appended. The resulting directories, if they exist, are appended to sys.path, and also inspected for path configuration files. If a file named "pyvenv.cfg" exists one directory above sys.executable, sys.prefix and sys.exec_prefix are set to that directory and it is also checked for site-packages and site-python (sys.base_prefix and sys.base_exec_prefix will always be the "real" prefixes of the Python installation). If "pyvenv.cfg" (a bootstrap configuration file) contains the key "include-system-site-packages" set to anything other than "false" (case-insensitive), the system-level prefixes will still also be searched for site-packages; otherwise they won't. All of the resulting site-specific directories, if they exist, are appended to sys.path, and also inspected for path configuration files. A path configuration file is a file whose name has the form .pth; its contents are additional directories (one per line) to be added to sys.path. Non-existing directories (or non-directories) are never added to sys.path; no directory is added to sys.path more than once. Blank lines and lines beginning with '#' are skipped. Lines starting with 'import' are executed. For example, suppose sys.prefix and sys.exec_prefix are set to /usr/local and there is a directory /usr/local/lib/python2.5/site-packages with three subdirectories, foo, bar and spam, and two path configuration files, foo.pth and bar.pth. Assume foo.pth contains the following: # foo package configuration foo bar bletch and bar.pth contains: # bar package configuration bar Then the following directories are added to sys.path, in this order: /usr/local/lib/python2.5/site-packages/bar /usr/local/lib/python2.5/site-packages/foo Note that bletch is omitted because it doesn't exist; bar precedes foo because bar.pth comes alphabetically before foo.pth; and spam is omitted because it is not mentioned in either path configuration file. After these path manipulations, an attempt is made to import a module named sitecustomize, which can perform arbitrary additional site-specific customizations. If this import fails with an ImportError exception, it is silently ignored. iNc GsStjj|Œ}ytjj|ƒ}Wntk r<YnX|tjj|ƒfS(N(uosupathujoinuabspathuOSErrorunormcase(upathsudir((u)/opt/alt/python33/lib64/python3.3/site.pyumakepathVs  umakepathcCs¼xµttjjƒƒD]ž}tt|ddƒddƒdkrFqnytjj|j ƒ|_ Wnt t fk r|YnXytjj|j ƒ|_ Wqt t fk r³YqXqWdS(uESet all module __file__ and __cached__ attributes to an absolute pathu __loader__u __module__u_frozen_importlibN( usetusysumodulesuvaluesugetattruNoneuosupathuabspathu__file__uAttributeErroruOSErroru __cached__(um((u)/opt/alt/python33/lib64/python3.3/site.pyu abs_paths_s u abs_pathscCsug}tƒ}xLtjD]A}t|ƒ\}}||kr|j|ƒ|j|ƒqqW|tjdd…<|S(uK Remove duplicate entries from sys.path along with making them absoluteN(usetusysupathumakepathuappenduadd(uLu known_pathsudirudircase((u)/opt/alt/python33/lib64/python3.3/site.pyuremoveduppathsos   uremoveduppathsc Csqtƒ}xatjD]V}y8tjj|ƒrPt|ƒ\}}|j|ƒnWqtk rhwYqXqW|S(uDReturn a set containing all existing directory entries from sys.path(usetusysupathuosuisdirumakepathuaddu TypeError(ududirudircase((u)/opt/alt/python33/lib64/python3.3/site.pyu_init_pathinfo‚s   u_init_pathinfoc CsÝ|dkrtƒd}nd}tjj||ƒ}yt|dƒ}Wntk rbdSYnX|_xWt|ƒD]I\}}|jdƒr˜qwny‚|jd ƒrºt |ƒwwn|j ƒ}t ||ƒ\}} | |krtjj |ƒrt jj|ƒ|j| ƒnWqwtk r¿tdj|d|ƒd t jƒddl} xK| jt jƒŒD]4} x+| jƒD]}td |d t jƒq‚WqoWtd d t jƒPYqwXqwWWdQX|rÙd}n|S( uÖProcess a .pth file within the site-packages directory: For each line in the file, either combine it with sitedir to a path and add that to known_paths, or execute it if it starts with 'import '. iiurNu#uimport uimport u"Error processing line {:d} of {}: ufileu u Remainder of file ignored(uimport uimport (uNoneu_init_pathinfouosupathujoinuopenuIOErroru enumerateu startswithuexecurstripumakepathuexistsusysuappenduaddu Exceptionuprintuformatustderru tracebackuformat_exceptionuexc_infou splitlines( usitedirunameu known_pathsuresetufullnameufunulineudirudircaseu tracebackurecord((u)/opt/alt/python33/lib64/python3.3/site.pyu addpackagesD          u addpackagec CsÞ|dkrtƒ}d}nd}t|ƒ\}}||krbtjj|ƒ|j|ƒnytj|ƒ}Wntj k rdSYnXdd„|Dƒ}x$t |ƒD]}t |||ƒq±W|rÚd}n|S(uTAdd 'sitedir' argument to sys.path if missing and handle .pth files in 'sitedir'iiNcSs%g|]}|jdƒr|‘qS(u.pth(uendswith(u.0uname((u)/opt/alt/python33/lib64/python3.3/site.pyu És uaddsitedir..( uNoneu_init_pathinfoumakepathusysupathuappenduadduosulistdiruerrorusortedu addpackage(usitediru known_pathsuresetu sitedircaseunamesuname((u)/opt/alt/python33/lib64/python3.3/site.pyu addsitedir¹s$      u addsitedircCsŽtjjrdSttdƒrMttdƒrMtjƒtjƒkrMdSnttdƒrŠttdƒrŠtj ƒtj ƒkrŠdSndS(u,Check if user site directory is safe for inclusion The function tests for the command line flag (including environment var), process uid/gid equal to effective uid/gid. None: Disabled for security reasons False: Disabled by user (command line option) True: Safe and enabled ugetuidugeteuidugetgidugetegidFNT( usysuflagsu no_user_siteuFalseuhasattruosugeteuidugetuiduNoneugetegidugetgiduTrue(((u)/opt/alt/python33/lib64/python3.3/site.pyucheck_enableusersiteÑs ucheck_enableusersitecCs0tdk rtSddlm}|dƒatS(uËReturns the `user base` directory path. The `user base` directory can be used to store data. If the global variable ``USER_BASE`` is not initialized yet, this function will also set it. i(uget_config_varuuserbaseN(u USER_BASEuNoneu sysconfiguget_config_var(uget_config_var((u)/opt/alt/python33/lib64/python3.3/site.pyu getuserbaseés   u getuserbasecCs„tƒ}td k rtSddlm}tjdkrjddlm}|dƒrj|ddƒatSn|ddtj ƒatS( u¢Returns the user-specific site-packages directory path. If the global variable ``USER_SITE`` is not initialized yet, this function will also set it. i(uget_pathudarwin(uget_config_varuPYTHONFRAMEWORKupurelibuosx_framework_useru%s_userN( u getuserbaseu USER_SITEuNoneu sysconfiguget_pathusysuplatformuget_config_varuosuname(u user_baseuget_pathuget_config_var((u)/opt/alt/python33/lib64/python3.3/site.pyugetusersitepackages÷s   ugetusersitepackagescCs5tƒ}tr1tjj|ƒr1t||ƒn|S(u†Add a per user site-package to sys.path Each user has its own python directory with site-packages in the home directory. (ugetusersitepackagesuENABLE_USER_SITEuosupathuisdiru addsitedir(u known_pathsu user_site((u)/opt/alt/python33/lib64/python3.3/site.pyuaddusersitepackagess uaddusersitepackagesc CsØg}tƒ}|dkr$t}nx­|D]¥}| s+||krJq+n|j|ƒtjdkrˆ|jtjj |ddƒƒnâtj dkr|jtjj |ddtj dd …dƒƒ|jtjj |d dtj dd …dƒƒ|jtjj |d d ƒƒnK|j|ƒ|jtjj |ddƒƒ|jtjj |d dƒƒtjd kr+d dl m }|dƒ}|rÐ|jtjj d|tj dd …dƒƒqÐq+q+W|S(u=Returns a list containing all global site-packages directories (and possibly site-python). For each directory present in ``prefixes`` (or the global ``PREFIXES``), this function will find its `site-packages` subdirectory depending on the system environment, and will return a list of full paths. uos2emxuriscosuLibu site-packagesu/ulib64upythonNiulibu site-pythonudarwini(uget_config_varuPYTHONFRAMEWORKu/Library(uos2emxuriscos(usetuNoneuPREFIXESuaddusysuplatformuappenduosupathujoinusepuversionu sysconfiguget_config_var(uprefixesu sitepackagesuseenuprefixuget_config_varu framework((u)/opt/alt/python33/lib64/python3.3/site.pyugetsitepackagess:     "  "  $ugetsitepackagescCs=x6t|ƒD](}tjj|ƒr t||ƒq q W|S(u8Add site-packages (and possibly site-python) to sys.path(ugetsitepackagesuosupathuisdiru addsitedir(u known_pathsuprefixesusitedir((u)/opt/alt/python33/lib64/python3.3/site.pyuaddsitepackagesHsuaddsitepackagescCsotjjtjddƒ}tjdjdƒ}|drK|j|ƒn ||d.QuittercSs ||_dS(N(uname(uselfuname((u)/opt/alt/python33/lib64/python3.3/site.pyu__init__psu!setquit..Quitter.__init__csd|jˆfS(NuUse %s() or %s to exit(uname(uself(ueof(u)/opt/alt/python33/lib64/python3.3/site.pyu__repr__rsu!setquit..Quitter.__repr__c Ss,ytjjƒWnYnXt|ƒ‚dS(N(usysustdinucloseu SystemExit(uselfucode((u)/opt/alt/python33/lib64/python3.3/site.pyu__call__ts u!setquit..Quitter.__call__N(u__name__u __module__u __qualname__u__init__u__repr__uNoneu__call__(u __locals__(ueof(u)/opt/alt/python33/lib64/python3.3/site.pyuQuitteros uQuitteruquituexitN(uosusepuobjectubuiltinsuquituexit(uQuitter((ueofu)/opt/alt/python33/lib64/python3.3/site.pyusetquitas   usetquitcBsV|EeZdZdZdZffdd„Zdd„Zdd„Zd d „Zd S( u_Printeruninteractive prompt objects for printing the license text, a list of contributors and the copyright notice.icCs1||_||_||_||_d|_dS(N(u_Printer__nameu_Printer__datau_Printer__filesu_Printer__dirsuNoneu_Printer__lines(uselfunameudataufilesudirs((u)/opt/alt/python33/lib64/python3.3/site.pyu__init__†s     u_Printer.__init__c CsÓ|jr dSd}xƒ|jD]x}xe|jD]Z}tjj||ƒ}y*t|dƒ}|jƒ}|j ƒPWq-t k r†Yq-Xq-W|rPqqW|s«|j }n|j dƒ|_t |jƒ|_dS(Nuru (u_Printer__linesuNoneu_Printer__dirsu_Printer__filesuosupathujoinuopenureaducloseuIOErroru_Printer__datausplitulenu_Printer__linecnt(uselfudataudirufilenameufp((u)/opt/alt/python33/lib64/python3.3/site.pyu__setups&      u_Printer.__setupcCsH|jƒt|jƒ|jkr2dj|jƒSd|jfdSdS(Nu u!Type %s() to see the full %s texti(u_Printer__setupulenu_Printer__linesuMAXLINESujoinu_Printer__name(uself((u)/opt/alt/python33/lib64/python3.3/site.pyu__repr__¢s u_Printer.__repr__c CsÃ|jƒd}d}x¦y6x/t|||jƒD]}t|j|ƒq3WWntk rdPYqX||j7}d}x1|dkr«t|ƒ}|dkr{d}q{q{W|dkrPqqdS(Nu0Hit Return for more, or q (and Return) to quit: iuuq(uuq(u_Printer__setupurangeuMAXLINESuprintu_Printer__linesu IndexErroruNoneuinput(uselfupromptulinenouiukey((u)/opt/alt/python33/lib64/python3.3/site.pyu__call__©s"       u_Printer.__call__N( u__name__u __module__u __qualname__u__doc__uMAXLINESu__init__u_Printer__setupu__repr__u__call__(u __locals__((u)/opt/alt/python33/lib64/python3.3/site.pyu_Printer€s   u_PrintercCsªtdtjƒt_tjdd…dkrCtddƒt_ntddƒt_tjjtj ƒ}tdd d d gtjj |tj ƒ|tj gƒt_ dS( u)Set 'copyright' and 'credits' in builtinsu copyrightNiujavaucreditsu?Jython is maintained by the Jython developers (www.jython.org).už Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information.ulicenseu'See https://www.python.org/psf/license/u LICENSE.txtuLICENSE(u_Printerusysu copyrightubuiltinsuplatformucreditsuosupathudirnameu__file__ujoinupardirucurdirulicense(uhere((u)/opt/alt/python33/lib64/python3.3/site.pyu setcopyright½s  u setcopyrightcBs2|EeZdZdZdd„Zdd„ZdS(u_HelperuXDefine the builtin 'help'. This is a wrapper around pydoc.help (with a twist). cCsdS(NuHType help() for interactive help, or help(object) for help about object.((uself((u)/opt/alt/python33/lib64/python3.3/site.pyu__repr__Ösu_Helper.__repr__cOsddl}|j||ŽS(Ni(upydocuhelp(uselfuargsukwdsupydoc((u)/opt/alt/python33/lib64/python3.3/site.pyu__call__Ùs u_Helper.__call__N(u__name__u __module__u __qualname__u__doc__u__repr__u__call__(u __locals__((u)/opt/alt/python33/lib64/python3.3/site.pyu_HelperÐs u_HelpercCstƒt_dS(N(u_Helperubuiltinsuhelp(((u)/opt/alt/python33/lib64/python3.3/site.pyu sethelperÝsu sethelperc Cs¢tjdkržddl}ddl}|jƒd}|jdƒržy|j|ƒWq›tk r—ddl}|j |j |(\w|[-_])+)\s*=\s*(?P.*)\s*$c CsÑtj}tjdkr4d|kr4tjd}n tj}tjjtjj|ƒƒ\}}tjj|ƒ}dt_ d}dd„tjj ||ƒtjj ||ƒfDƒ}|rÍ|d}d} t |ƒ–} xŒ| D]„} | j ƒ} tj| ƒ} | rå| jƒ} | djƒ| d }}|d krN|jƒ} qi|d kri|t_ qiqåqåWWdQX|t_t_t|tjgƒ| dkr¸tjdtjƒqÍtjgad an|S( Nudarwinu__PYVENV_LAUNCHER__u pyvenv.cfgcSs(g|]}tjj|ƒr|‘qS((uosupathuisfile(u.0uconffile((u)/opt/alt/python33/lib64/python3.3/site.pyu ÿs uvenv..iutrueukeyuvalueuinclude-system-site-packagesuhomeF(uosuenvironusysuplatformu executableupathusplituabspathudirnameuNoneu_homeujoinuopenustripu CONFIG_LINEumatchu groupdictuloweruprefixu exec_prefixuaddsitepackagesuPREFIXESuinsertuFalseuENABLE_USER_SITE(u known_pathsuenvu executableuexe_diru_u site_prefixu conf_basenameucandidate_confsu virtual_confu system_siteufulineumudukeyuvalue((u)/opt/alt/python33/lib64/python3.3/site.pyuvenvòs@  $           uvenvcCs•yddl}Wn~tk r$Ynmtk r}zMtjjdƒr^tjtjƒŒn tj j d|j j |fƒWYdd}~XnXdS(u,Run custom site specific code, if available.iNu PYTHONVERBOSEu@Error in sitecustomize; set PYTHONVERBOSE for traceback: %s: %s ( u sitecustomizeu ImportErroru Exceptionuosuenvironugetusysu excepthookuexc_infoustderruwriteu __class__u__name__(u sitecustomizeuerr((u)/opt/alt/python33/lib64/python3.3/site.pyuexecsitecustomize%s  uexecsitecustomizecCs•yddl}Wn~tk r$Ynmtk r}zMtjjdƒr^tjtjƒŒn tj j d|j j |fƒWYdd}~XnXdS(u,Run custom user specific code, if available.iNu PYTHONVERBOSEu@Error in usercustomize; set PYTHONVERBOSE for traceback: %s: %s ( u usercustomizeu ImportErroru Exceptionuosuenvironugetusysu excepthookuexc_infoustderruwriteu __class__u__name__(u usercustomizeuerr((u)/opt/alt/python33/lib64/python3.3/site.pyuexecusercustomize5s  uexecusercustomizecCsœtƒtƒ}t|ƒ}tdkr4tƒant|ƒ}t|ƒ}tj dkret ƒnt ƒt ƒt ƒtƒtƒtr˜tƒndS(uÏAdd standard site-specific directories to the module search path. This function is called automatically when this module is imported, unless the python interpreter was started with the -S flag. uos2emxN(u abs_pathsuremoveduppathsuvenvuENABLE_USER_SITEuNoneucheck_enableusersiteuaddusersitepackagesuaddsitepackagesusysuplatformusetBEGINLIBPATHusetquitu setcopyrightu sethelperu aliasmbcsuexecsitecustomizeuexecusercustomize(u known_paths((u)/opt/alt/python33/lib64/python3.3/site.pyumainEs        umaincCsÜd}tjdd…}|sàtƒ}tƒ}tdƒx"tjD]}td|fƒqEWtdƒtd|tjj|ƒr‹dndfƒtd |tjj|ƒr·dndfƒtd tƒtj d ƒng}d |kr|j t ƒnd |kr|j t ƒn|r˜ttj j|ƒƒtrPtj d ƒqØtdkrltj dƒqØtdkrˆtj dƒqØtj dƒn@d dl}t|j|tjd tj fƒƒtj dƒdS(Nu² %s [--user-base] [--user-site] Without arguments print some useful information With arguments print the value of USER_BASE and/or USER_SITE separated by '%s'. Exit codes with --user-base or --user-site: 0 - user site directory is enabled 1 - user site directory is disabled by user 2 - uses site directory is disabled by super user or for security reasons >2 - unknown error iu sys.path = [u %r,u]uUSER_BASE: %r (%s)uexistsu doesn't existuUSER_SITE: %r (%s)uENABLE_USER_SITE: %riu --user-baseu --user-siteiii F(usysuargvu getuserbaseugetusersitepackagesuprintupathuosuisdiruENABLE_USER_SITEuexituappendu USER_BASEu USER_SITEupathsepujoinuFalseuNoneutextwrapudedent(uhelpuargsu user_baseu user_siteudirubufferutextwrap((u)/opt/alt/python33/lib64/python3.3/site.pyu_scriptcs@     # #     'u_scriptu__main__(*u__doc__usysuosureubuiltinsuprefixu exec_prefixuPREFIXESuNoneuENABLE_USER_SITEu USER_SITEu USER_BASEumakepathu abs_pathsuremoveduppathsu_init_pathinfou addpackageu addsitedirucheck_enableusersiteu getuserbaseugetusersitepackagesuaddusersitepackagesugetsitepackagesuaddsitepackagesusetBEGINLIBPATHusetquituobjectu_Printeru setcopyrightu_Helperu sethelperu aliasmbcsucompileu CONFIG_LINEuvenvuexecsitecustomizeuexecusercustomizeumainuflagsuno_siteu_scriptu__name__(((u)/opt/alt/python33/lib64/python3.3/site.pyuBsJ       *    ,  =    3      3