Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pbr/__pycache__/core.cpython-35.pyc



•Vaã@sØddlmZddlmZddlZddlZddlZddlZddlmZddl	m
Z
ejZdd„Z
dd	„Zejdd
kr¶eZefZneZeefZdd„Z	dS)
é)Úcore)ÚerrorsN)Údist)ÚutilcCstjtjƒt_dS)N)rZ_get_unpatchedrÚDistribution©rrú/core.pyÚ_monkeypatch_distribution=sr	cCs
tt_dS)N)Ú_saved_core_distributionrrrrrrÚ!_restore_distribution_monkeypatchAsréc	sztƒ|sdSt|tƒr8tjj|ƒ}ntjjdƒ}tjj|ƒsotjd|ƒ‚yt	j
|ƒ}WnQtk
rÕtj
ƒd}tjdƒtjd||jj|fƒ‚YnX|r“x´|jƒD]¦\}}t|jd|ƒr(t|jd|ƒ|ƒqét|j|ƒrPt|j||ƒqét||ƒrrt|||ƒqédt|ƒ}tj|ƒqéWtjj|ƒt|jjtt fƒr×t!|jjƒ|j_d	d
g‰t	j"‡fdd†ƒ|_#Wdt$ƒXdS)
a9Implements the actual pbr setup() keyword.  When used, this should be
    the only keyword in your setup() aside from `setup_requires`.

    If given as a string, the value of pbr is assumed to be the relative path
    to the setup.cfg file to use.  Otherwise, if it evaluates to true, it
    simply assumes that pbr should be used, and the default 'setup.cfg' is
    used.

    This works by reading the setup.cfg file, parsing out the supported
    metadata and command options, and using them to rebuild the
    `DistributionMetadata` object and set the newly added command options.

    The reason for doing things this way is that a custom `Distribution` class
    will not play nicely with setup_requires; however, this implementation may
    not work well with distributions that do use a `Distribution` subclass.
    Nz	setup.cfgz%The setup.cfg file %s does not exist.éz
Error parsingzError parsing %s: %s: %sZset_zUnknown distribution option: %sz
pre_hook.*zpost_hook.*cs
tjˆƒS)N)rZ
IgnoreDictr)ÚignorerrÚ<lambda>—szpbr.<locals>.<lambda>)%r	Ú
isinstanceÚstring_typeÚosÚpathÚabspathÚexistsrZDistutilsFileErrorrZcfg_to_argsÚ	ExceptionÚsysÚexc_infoÚloggingÚ	exceptionZDistutilsSetupErrorÚ	__class__Ú__name__ÚitemsÚhasattrZmetadataÚgetattrÚsetattrÚreprÚwarningsÚwarnrrZfinalize_optionsÚversionÚ
integer_typesÚfloatÚstrZDefaultGetDictZcommand_optionsr)	rÚattrÚvaluerZattrsÚeÚkeyÚvalÚmsgr)rrÚpbrMsD


!r.)Z	distutilsrrrrrr"Z
setuptoolsrr.rrr
r	rÚversion_infor'rÚintr%Ú
basestringÚlongrrrrÚ<module>.s 	
Back to Directory File Manager