KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/22697/root/usr/lib64/python2.4/distutils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/22697/root/usr/lib64/python2.4/distutils/dist.pyo
m
=5Dc@sdZdZdkZdkZdkZdkZdkTdklZy
dkZWne	j
o
e
ZnXdkTdkl
Z
lZdklZlZlZdklZdklZeid	Zd
fdYZdfd
YZdZedjoeZdGHndS(s}distutils.dist

Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
s0$Id: dist.py 37828 2004-11-10 22:23:15Z loewis $N(t*(scopy(sFancyGetoptstranslate_longopt(s
check_environs	strtobools
rfc822_escape(slog(sDEBUGs^[a-zA-Z]([a-zA-Z0-9_]*)$tDistributioncBsHtZdZdTdUdVdWgZdedfdedfdXdedfdedfdedfdedfdedfded fd!ed"fd#ed$fd%ed&fd'ed(fd)ed*fd+ed,fd-ed.fd/ed0fd1ed2fgZed3eZhdd<Zed4Z	d5Z
eed6d7Zd8Zed9Z
d:Zd;Zd<Zd=Zddgd>Zd?Zd@ZdAZdBZdCZdDZddEZedFZdGdHZddIZdJZdKZdLZdMZ dNZ!dOZ"dPZ#dQZ$dRZ%dSZ&RS(YsThe core of the Distutils.  Most of the work hiding behind 'setup'
    is really done within a Distribution instance, which farms the work out
    to the Distutils commands specified on the command line.

    Setup scripts will almost never instantiate Distribution directly,
    unless the 'setup()' function is totally inadequate to their needs.
    However, it is conceivable that a setup script might wish to subclass
    Distribution for some specialized purpose, and then pass the subclass
    to 'setup()' as the 'distclass' keyword argument.  If so, it is
    necessary to respect the expectations that 'setup' has of Distribution.
    See the code for 'setup()', in core.py, for details.
    tverbosetvsrun verbosely (default)itquiettqs!run quietly (turns verbosity off)sdry-runtnsdon't actually do anythingthelpthsshow detailed help messages
help-commandsslist all available commandstnamesprint package nametversiontVsprint package versiontfullnamesprint <package name>-<version>tauthorsprint the author's namesauthor-emails print the author's email addresst
maintainersprint the maintainer's namesmaintainer-emails$print the maintainer's email addresstcontacts7print the maintainer's name if known, else the author'ss
contact-emails@print the maintainer's email address if known, else the author'sturlsprint the URL for this packagetlicenses print the license of the packagetlicencesalias for --licensetdescriptionsprint the package descriptionslong-descriptions"print the long package descriptiont	platformssprint the list of platformstclassifierssprint the list of classifierstkeywordssprint the list of keywordscCst|dS(Ni(ttranslate_longopttx(R((t&/usr/lib64/python2.4/distutils/dist.pyt<lambda>esc
Csd|_d|_d|_x!|iD]}t||dq%Wt|_x:|ii	D],}d|}t||t|i|qXWh|_
d|_d|_d|_h|_d|_h|_d|_d|_d|_d|_d|_d|_d|_d|_d|_d|_h|_h|_ |o|i"d}|od|d=xZ|i$D]H\}
}|i'|
}x*|i$D]\}}	d|	f||<qWqdWn|i+doQ|d|d<|d=d}t-dj	ot-i.|qt/i0i1|d	nx|i$D]\}}	t3|i|ot|i||	q"t3||ot|||	q"d
t4|}t-dj	ot-i.|q"t/i0i1|d	q"Wn|i5dS(s0Construct a new Distribution instance: initialize all the
        attributes of a Distribution, and then use 'attrs' (a dictionary
        mapping attribute names to values) to assign some of those
        attributes their "real" values.  (Any attributes not mentioned in
        'attrs' will be assigned to some null value: 0, None, an empty list
        or dictionary, etc.)  Most importantly, initialize the
        'command_obj' attribute to the empty dictionary; this will be
        filled in with real command objects by 'parse_command_line()'.
        iitget_toptionsssetup scriptRRs:'licence' distribution option is deprecated; use 'license's
sUnknown distribution option: %sN(6tselfRtdry_runRtdisplay_option_namestattrtsetattrtDistributionMetadatatmetadatat_METHOD_BASENAMEStbasenametmethod_nametgetattrtcmdclasstNonetcommand_packagestscript_nametscript_argstcommand_optionstpackagestpackage_datatpackage_dirt
py_modulest	librariestheaderstext_modulestext_packagetinclude_dirst
extra_pathtscriptst
data_filestcommand_objthave_runtattrstgetRtitemstcommandtcmd_optionstget_option_dicttopt_dicttopttvalthas_keytmsgtwarningstwarntsyststderrtwritetkeythasattrtreprtfinalize_options(
RR<RCR RBR%R@RR&RDR?RLRF((Rt__init__nsv				


 																			




cCs8|ii|}|djoh}|i|<n|S(sGet the option dictionary for a given command.  If that
        command's option dictionary hasn't been created yet, then create it
        and return the new dictionary; otherwise, return the existing
        option dictionary.
        N(RR-R=R?tdictR)(RR?RQ((RRAs

tc	Csdkl}|djo|ii}|in|dj	o||GH|d}n|p|dGHdSnx|D]y}|ii|}|djo|d|GHqz|d|GH||}x'ti|dD]}|d|GHqWqzWdS(N(spformats  sno commands known yetsno option dict for '%s' commandsoption dict for '%s' command:s
(tpprinttpformattcommandsR)RR-tkeystsorttheadertindenttcmd_nameR=RBtouttstringtsplittline(	RRXRURYR^RTRZRBR[((Rtdump_option_dictss(


		

cCsg}ttiitidi}tii	|d}tii|o|i|nti
djo
d}nd}tiidoItii	tiid|}tii|o|i|qnd}tii|o|i|n|S(	sXFind as many configuration files as should be processed for this
        platform, and return a list of filenames in the order in which they
        should be parsed.  The filenames returned are guaranteed to exist
        (modulo nasty race conditions).

        There are three possible config files: distutils.cfg in the
        Distutils installation directory (ie. where the top-level
        Distutils __inst__.py file lives), a file in the user's home
        directory named .pydistutils.cfg on Unix and pydistutils.cfg
        on Windows/Mac, and setup.cfg in the current directory.
        t	distutilss
distutils.cfgtposixs.pydistutils.cfgspydistutils.cfgtHOMEs	setup.cfgN(tfilest
check_environtostpathtdirnameRItmodulest__file__tsys_dirtjointsys_filetisfiletappendR	t
user_filenametenvironRER=t	user_filet
local_file(RRcRrRqRjRlRo((Rtfind_config_files!s$
!c
Csdkl}|djo|i}nto	dGHn|}x|D]}
to
dG|
GHn|i|
x|i	D]}}|i|}|i|}xV|D]N}|djo;|i||}ti|dd}|
|f||<qqWq~W|iqJW|iidox|idiD]\}\}}|ii|}y]|ot||t|n8|d
jot||t|nt|||Wq4tj
o}	t|	q4Xq4WndS(N(sConfigParsers"Distribution.parse_config_files():s	  readingt__name__t-t_tglobalRR(sverbosesdry_run(tConfigParsert	filenamesR)RRstDEBUGtparsertfilenametreadtsectionstsectionRRARBRCR=RDR\treplaceRPR-RER>tsrctnegative_opttaliasR!t	strtoboolt
ValueErrorRFtDistutilsOptionError(
RRyRCRRDRBR{RRRFR|RRx((Rtparse_config_filesNsD

		




cCsp|i}tidjo5dk}|i}|i||i	||_
ng|_t||i	}|i|i|ihdd<|id|i
d|}|i}ti|i|i|odSnx3|o+|i||}|djodSqqW|io3|i|dt|idjd	|idSn|ip
td
ndS(sParse the setup script's command line, taken from the
        'script_args' instance attribute (which defaults to 'sys.argv[1:]'
        -- see 'setup()' in core.py).  This list is first processed for
        "global options" -- options that set attributes of the Distribution
        instance.  Then, it is alternately scanned for Distutils commands
        and options for that command.  Each new command terminates the
        options for the previous command.  The allowed options for a
        command are determined by the 'user_options' attribute of the
        command class -- thus, we have to be able to load command classes
        in order to parse the command line.  Any error in that 'options'
        attribute raises DistutilsGetoptError; any error on the
        command-line raises DistutilsArgError.  If no Distutils commands
        were found on the command line, raises DistutilsArgError.  Return
        true if command-line was successfully parsed and we should carry
        on with executing commands; false if no errors but we shouldn't
        execute commands (currently, this only happens if user asks for
        help).
        tmacNRRtargstobjecttdisplay_optionsiRUsno commands suppliedi(Rt_get_toplevel_optionsttoplevel_optionsRItplatformtEasyDialogstget_command_listtcmdlisttGetArgvRR,RUtFancyGetoptR{tset_negative_aliasesRtset_aliasestgetoptRtget_option_ordertoption_ordertlogt
set_verbosityRthandle_display_optionst_parse_command_optsR)Rt
_show_helptlentDistutilsArgError(RRRR{RRR((Rtparse_command_line~s8	 
	


	


cCs|idgS(sReturn the non-display options recognized at the top level.

        This includes options that are recognized *only* at the top
        level as well as options recognized for commands.
        scommand-packages=s0list of packages that provide distutils commandsN(scommand-packages=Ns0list of packages that provide distutils commands(Rtglobal_optionsR)(R((RRscCsdkl}	|d}ti|ptd|n|ii	|y|i
|}Wntj
o}t|nXt||	ptd|nt|dot|itjptdd|n|i}t|do t|}|i|int|d	o)t|itjot|i}ng}|i|i|i||i||i|d
\}}t|do.|i o$|i!|ddd
|gdSnt|d	ot|itjod}xn|iD]c\}}
}}
t||i'|o8d
}t(|
o|
qhtd|
|fqqW|odSqn|i)|}x0t+|i,D]\}}d|f||<qW|S(sParse the command-line options for a single command.
        'parser' must be a FancyGetopt instance; 'args' must be the list
        of arguments, starting with the current command (whose options
        we are about to parse).  Returns a new version of 'args' with
        the next command at the front of the list; will be the empty
        list if there are no more commands on the command line.  Returns
        None if the user asked for help on this command.
        (sCommandisinvalid command name '%s's&command class %s must subclass Commandtuser_optionsscommand class %s must provide s+'user_options' attribute (a list of tuples)Rthelp_optionsiRRRUNsYinvalid help function %r for help option '%s': must be a callable object (function, etc.)scommand line(/t
distutils.cmdtCommandRR?t
command_retmatcht
SystemExitRRURntget_command_classt	cmd_classtDistutilsModuleErrorRFRt
issubclasstDistutilsClassErrorRMttypeRtListTypeRtcopytupdateRtfix_help_optionsR{tset_option_tableRRRtoptsRRthelp_option_foundthelp_optiontshorttdesctfunct
get_attr_nametcallableRARBtvarsR>R	tvalue(RR{RRRRRFRRRRRRRR	R?RBR((RRsV

&	&
&

cCs|ii}|dj	oEt|tjo.ti|d}t	ti
||i_q^n|ii}|dj	oEt|tjo.ti|d}t	ti
||i_qndS(sSet final values for all the options on the Distribution
        instance, analogous to the .finalize_options() method of Command
        objects.
        t,N(
RR#RR)Rt
StringTypeR\R]tkeywordlisttmaptstripRtplatformlist(RRRRR((RRO6s
 
c
Cs[dkl}dkl}|o?|o|i}n
|i}|i
||idHn|o&|i
|i|iddHnx|iD]}t|tjot||o
|}	n|i|}	t|	do7t|	itjo!|i
|	it|	in|i
|	i|id|	iHqW||iGHdS(	sbShow help for the setup script command-line in the form of
        several lists of command-line options.  'parser' should be a
        FancyGetopt instance; do not expect it to be returned in the
        same state, as its option table will be reset to make it
        generate the correct help text.

        If 'global_options' is true, lists the global options:
        --verbose, --dry-run, etc.  If 'display_options' is true, lists
        the "display-only" options: --name, --version, etc.  Finally,
        lists per-command help for every command name or command class
        in 'commands'.
        (s	gen_usage(sCommandsGlobal options:s*Information display options (just display s!information, ignore any commands)RsOptions for '%s' command:N(tdistutils.coret	gen_usageRRRRRRRR{Rt
print_helpRUR?Rt	ClassTypeRtklassRRMRRRRRtR+(
RR{RRRURRR?RR((RRHs4

	


#
&!c	Csdkl}|io!|iH||iGHdSnd}h}x|iD]}d||d<qNWx|D]\}}|o|i
|o~t|}t|id|}|ddgjoti|dGHn(|djoti|d	GHn|GHd}qmqmW|S(sIf there were any non-global "display-only" options
        (--help-commands or the metadata display options) on the command
        line, display the requested info and return true; else return
        false.
        (s	gen_usageiiRRRRRs
N(RRRt
help_commandstprint_commandsR+tany_display_optionstis_display_optionRtoptionRRCRDR=RR'R#RR\Rk(	RRRRCRRRDRR((RRs0




cCs|dGHxu|D]m}|ii|}|p|i|}ny
|i}Wnt	j
o
d}nXd|||fGHqWdS(sZPrint a subset of the list of all commands -- used by
        'print_commands()'.
        t:s(no description available)s
  %-*s  %sN(RXRUtcmdRR(R=RRRtAttributeErrort
max_length(RRURXRRRR((Rtprint_command_lists	
cCsdk}|ii}h}x|D]}d||<q"Wg}x8|i	i
D]'}|i|p|i|qLqLWd}x5||D])}t||jot|}qqW|i|d||oH|i|d|ndS(snPrint out a help message listing all available commands with a
        description of each.  The list is divided into "standard commands"
        (listed in distutils.command.__all__) and "extra commands"
        (mentioned in self.cmdclass, but not a standard command).  The
        descriptions come from the command class attribute
        'description'.
        NiisStandard commandssExtra commands(tdistutils.commandR`R?t__all__tstd_commandstis_stdRtextra_commandsRR(RVR=RnRRR(RR`RRRRR((RRs2			c	Csdk}|ii}h}x|D]}d||<q"Wg}x8|i	i
D]'}|i|p|i|qLqLWg}xz||D]n}|i	i|}|p|i|}ny
|i}Wntj
o
d}nX|i||fqW|S(s>Get a list of (command, description) tuples.
        The list is divided into "standard commands" (listed in
        distutils.command.__all__) and "extra commands" (mentioned in
        self.cmdclass, but not a standard command).  The descriptions come
        from the command class attribute 'description'.
        Nis(no description available)(RR`R?RRRRRRR(RVR=RntrvRRRR(	RRRR`RRRRR((RRs0	
cCs|i}t|tgpti|pdd}x1tt|D]}ti
||||<qKWtd|}d|jo|i
ddn||_n|S(s9Return a list of packages from which commands are loaded.RRRsdistutils.commandiN(RR*tpkgst
isinstanceRR\R]trangeRtiRtfilterR)tinsert(RRR((Rtget_command_packagess	

cCs|ii|}|o|Snx|iD]}d||f}|}yt	|t
i|}Wnt
j
o
q.nXyt||}Wn)tj
otd|||fnX||i|<|Sq.Wtd|dS(soReturn the class that implements the Distutils command named by
        'command'.  First we check the 'cmdclass' dictionary; if the
        command is mentioned there, we fetch the class object from the
        dictionary and return it.  Otherwise we load the command module
        ("distutils.command." + command) and fetch the command class from
        the module.  The loaded class is also stored in 'cmdclass'
        to speed future calls to 'get_command_class()'.

        Raises DistutilsModuleError if the expected module could not be
        found, or if that module does not define the expected class.
        s%s.%ss3invalid command '%s' (no class '%s' in module '%s')sinvalid command '%s'N(RR(R=R?RRtpkgnametmodule_namet
klass_namet
__import__RIRhtmoduletImportErrorR'RR(RR?RRRRR((RRs(


cCs|ii|}|o|oxto
d|GHn|i|}||}|i|<d|i	|<|i
i|}|o|i||qn|S(sReturn the command object for 'command'.  Normally this object
        is cached on a previous call to 'get_command_obj()'; if no command
        object for 'command' is in the cache, then we either create and
        return it (if 'create' is true) or return None.
        s<Distribution.get_command_obj(): creating '%s' command objectiN(
RR:R=R?tcmd_objtcreateRzRRR;R-Rt_set_command_options(RR?RRRR((Rtget_command_obj<s

cCs|i}|djo|i|}nto
d|GHnxm|iD]_\}\}}	tod||	|fGHnytt
|i}
Wntj
o
g}
nXy
|i}Wntj
o
h}nXyt|	tj}|i|o&|ot|||t|	ni||
jo!|ot||t|	n;t||ot|||	ntd|||fWqMtj
o}t|qMXqMWdS(sySet the options for 'command_obj' from 'option_dict'.  Basically
        this means copying elements of a dictionary ('option_dict') to
        attributes of an instance ('command').

        'command_obj' must be a Command instance.  If 'option_dict' is not
        supplied, uses the standard option dictionary for this command
        (from 'self.command_options').
        s#  setting options for '%s' command:s    %s = %s (from %s)s1error in %s: command '%s' has no such option '%s'N(R:tget_command_nametcommand_nametoption_dictR)RRARzR>RtsourceRRRtboolean_optionst	bool_optsRRtneg_optRRt	is_stringRER!RRMRRRF(RR:RRRRRFRRRR((RRWs:



icCsdkl}t||p|}|i|}n
|i}|ip|Sn|i	d|_d|i
|<|i||o+x(|i
D]}|i||qWn|S(sReinitializes a command to the state it was in when first
        returned by 'get_command_obj()': ie., initialized but not yet
        finalized.  This provides the opportunity to sneak option
        values in programmatically, overriding or supplementing
        user-supplied values from the config files and command line.
        You'll have to re-finalize the command object (by calling
        'finalize_options()' or 'ensure_finalized()') before using it for
        real.

        'command' should be a command name (string) or command object.  If
        'reinit_subcommands' is true, also reinitializes the command's
        sub-commands, as declared by the 'sub_commands' class attribute (if
        it has one).  See the "install" command for an example.  Only
        reinitializes the sub-commands that actually matter, ie. those
        whose test predicates return true.

        Returns the reinitialized command object.
        (sCommandiN(RRRR?RRRRt	finalizedtinitialize_optionsR;Rtreinit_subcommandstget_sub_commandstsubtreinitialize_command(RR?RRRR((RRs"


	


cCsti|dS(N(RtdebugRF(RRFtlevel((RtannouncescCs%x|iD]}|i|q
WdS(sRun each command that was seen on the setup script command line.
        Uses the list of commands found and cache of command objects
        created by 'get_command_obj()'.
        N(RRURtrun_command(RR((Rtrun_commandss
cCs_|ii|odSntid||i|}|i|i	d|i|<dS(sDo whatever it takes to run a command (including nothing at all,
        if the command has already been run).  Specifically: if we have
        already created and run the command named by 'command', return
        silently without doing anything.  If the command named by 'command'
        doesn't even have a command object yet, create one.  Then invoke
        'run()' on that command object (or an existing one).
        Ns
running %si(
RR;R=R?RtinfoRRtensure_finalizedtrun(RR?R((RRs

cCs$t|ip|ipgdjS(Ni(RRR.R1(R((Rthas_pure_modulesscCs|iot|idjS(Ni(RR4R(R((Rthas_ext_modulesscCs|iot|idjS(Ni(RR2R(R((Rthas_c_librariesscCs|ip
|iS(N(RRR(R((Rthas_modulesscCs|iot|idjS(Ni(RR3R(R((Rthas_headersscCs|iot|idjS(Ni(RR8R(R((Rthas_scriptsscCs|iot|idjS(Ni(RR9R(R((Rthas_data_filesscCs&|io|io|iS(N(RRRR(R((Rtis_pures(sverboseRsrun verbosely (default)i(squietRs!run quietly (turns verbosity off)(sdry-runRsdon't actually do anything(shelpRsshow detailed help message(sversionRsprint package version('Rtt
__module__t__doc__RR)RRRRRPRAR_RsRRRRRORRRRRRRRRRRRRRRRRRRRR(((RR!sH&			
	-0	K		b	9	)		$	#	
	)(*									R"cBstZdZd%ZdZdZdZdZdZdZ	dZ
dZdZdZ
dZdZdZeZdZd Zd!Zd"Zd#Zd$ZRS(&s]Dummy class to hold the distribution meta-data: name, version,
    author, and so forth.
    R	R
R
tauthor_emailRtmaintainer_emailRRRtlong_descriptionRRRRt
contact_emailRtdownload_urlcCsd|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
d|_d|_dS(N(R)RR	R
R
R
RRRRRRRRRR(R((RRPs													cCsttii|dd}|id|id|i|id|i	|id|i
|id|i|id|i|id	|i
|id
|i|io|id|int|i}|id|ti|id
}|o|id|nx%|iD]}|id|qRWx%|iD]}|id|qzW|idS(s7Write the PKG-INFO file into the release tree.
        sPKG-INFOtwsMetadata-Version: 1.0
s	Name: %s
sVersion: %s
sSummary: %s
sHome-page: %s
sAuthor: %s
sAuthor-email: %s
sLicense: %s
sDownload-URL: %s
sDescription: %s
Rs
Keywords: %s
s
Platform: %s
sClassifier: %s
N(topenReRfRktbase_dirtpkg_infoRKRtget_nametget_versiontget_descriptiontget_urltget_contacttget_contact_emailtget_licenseRt
rfc822_escapetget_long_descriptiont	long_descR\tget_keywordsRt
get_platformsRtget_classifierst
classifiertclose(RRRRRRR ((Rtwrite_pkg_infos0



cCs|ipdS(NtUNKNOWN(RR	(R((RR0scCs|ipdS(Ns0.0.0(RR
(R((RR3scCsd|i|ifS(Ns%s-%s(RRR(R((Rtget_fullname6scCs|ipdS(NR#(RR
(R((Rt
get_author9scCs|ipdS(NR#(RR
(R((Rtget_author_email<scCs|ipdS(NR#(RR(R((Rtget_maintainer?scCs|ipdS(NR#(RR(R((Rtget_maintainer_emailBscCs|ip|ipdS(NR#(RRR
(R((RREscCs|ip|ipdS(NR#(RRR
(R((RRJscCs|ipdS(NR#(RR(R((RROscCs|ipdS(NR#(RR(R((RRRscCs|ipdS(NR#(RR(R((RRVscCs|ipdS(NR#(RR(R((RRYscCs|ipgS(N(RR(R((RR\scCs|ipdgS(NR#(RR(R((RR_scCs|ipgS(N(RR(R((RRbscCs|ipdS(NR#(RR(R((Rtget_download_urles(snamesversionsauthorsauthor_emails
maintainersmaintainer_emailsurlslicensesdescriptionslong_descriptionskeywordss	platformssfullnamescontactR
slicensesclassifierssdownload_url(RtRR	R$RPR"RRR$R%R&R'R(RRRRtget_licenceRRRRRR)(((RR"s,		$																cCs/g}x"|D]}|i|dd!q
W|S(sConvert a 4-tuple 'help_options' list as found in various command
    classes to the 3-tuple form required by FancyGetopt.
    iiN(tnew_optionsRt
help_tupleRn(RR,R+((RRkst__main__tok(R	t__revision__RIReR\trettypesRRGRR)tdistutils.errorstdistutils.fancy_getoptRRtdistutils.utilRdRRR`Rtdistutils.debugRztcompileRRR"RRttdist(RdR7RRR/RR"RR0R\RGRIRzRRRRReR((Rt?s.$



{	

	

Anon7 - 2021