Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
øðuYc@@súddlmZmZddlZddlZddlZddlmZddlm	Z	ddl
mZmZddl
mZddlmZeed„Zd	„Zed
„Zdefd„ƒYZd
efd„ƒYZdefd„ƒYZdS(i(tabsolute_importtunicode_literalsN(tdefaultdict(tpartial(tDistutilsOptionErrortDistutilsFileError(t
import_module(tstring_typesc	C@sùddlm}m}tjj|ƒ}tjj|ƒsMtd|ƒ‚ntjƒ}tj	tjj
|ƒƒzl|ƒ}|r|jƒng}||kr²|j|ƒn|j
|d|ƒt||jd|ƒ}Wdtj	|ƒXt|ƒS(u,Read given configuration file and returns options from it as a dict.

    :param str|unicode filepath: Path to configuration file
        to get options from.

    :param bool find_others: Whether to search for other configuration files
        which could be on in various places.

    :param bool ignore_option_errors: Whether to silently ignore
        options, values of which could not be resolved (e.g. due to exceptions
        in directives such as file:, attr:, etc.).
        If False exceptions are propagated as expected.

    :rtype: dict
    i(tDistributiont
_Distributionu%Configuration file %s does not exist.t	filenamestignore_option_errorsN(tsetuptools.distRR	tostpathtabspathtisfileRtgetcwdtchdirtdirnametfind_config_filestappendtparse_config_filestparse_configurationtcommand_optionstconfiguration_to_dict(	tfilepathtfind_othersRRR	tcurrent_directorytdistR
thandlers((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pytread_configuration
s$	
cC@s’ttƒ}x|D]w}|j}|j}x\|jD]Q}t|d|dƒ}|dkrot||ƒ}n	|ƒ}||||<q5WqW|S(u»Returns configuration data gathered by given handlers as a dict.

    :param list[ConfigHandler] handlers: Handlers list,
        usually from parse_configuration()

    :rtype: dict
    uget_%sN(Rtdicttsection_prefixt
target_objtset_optionstgetattrtNone(Rtconfig_dictthandlert	obj_aliasR"toptiontgettertvalue((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyR<s
			cC@sEt|j||ƒ}|jƒt|||ƒ}|jƒ||gS(uÒPerforms additional parsing of configuration options
    for a distribution.

    Returns a list of used option handlers.

    :param Distribution distribution:
    :param dict command_options:
    :param bool ignore_option_errors: Whether to silently ignore
        options, values of which could not be resolved (e.g. due to exceptions
        in directives such as file:, attr:, etc.).
        If False exceptions are propagated as expected.
    :rtype: list
    (tConfigMetadataHandlertmetadatatparsetConfigOptionsHandler(tdistributionRRtmetatoptions((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyRYs

t
ConfigHandlercB@s¿eZdZdZiZed„Zed„ƒZ	d„Z
edd„ƒZed„ƒZ
ed„ƒZed„ƒZed	„ƒZed
„ƒZedd„ƒZd„Zd
„ZRS(u1Handles metadata supplied in configuration files.cC@sŽi}|j}xT|jƒD]F\}}|j|ƒs=qn|j|dƒjdƒ}|||<qW||_||_||_g|_dS(Nuu.(	R!titemst
startswithtreplacetstripRR"tsectionsR#(tselfR"R2RR8R!tsection_nametsection_options((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyt__init__ƒs				cC@std|jjƒ‚dS(u.Metadata item name to parser function mapping.u!%s must provide .parsers propertyN(tNotImplementedErrort	__class__t__name__(R9((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pytparsers“sc	C@stƒ}|j}|jj||ƒ}t|||ƒ}||krTt|ƒ‚n|r^dSt}|jj|ƒ}|r¸y||ƒ}Wq¸tk
r´t	}|j
sµ‚qµq¸Xn|rÂdSt|d|dƒ}|dkr÷t|||ƒn
||ƒ|j
j|ƒdS(Nuset_%s(ttupleR"taliasestgetR$tKeyErrortFalseR@t	ExceptiontTrueRR%tsetattrR#R(	R9toption_nameR+tunknownR"t
current_valuetskip_optiontparsertsetter((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyt__setitem__™s0		
	

u,cC@sft|tƒr|Sd|kr.|jƒ}n|j|ƒ}g|D]}|jƒrD|jƒ^qDS(u×Represents value as a list.

        Value is split either by separator (defaults to comma) or by lines.

        :param value:
        :param separator: List items separator character.
        :rtype: list
        u
(t
isinstancetlistt
splitlinestsplitR7(tclsR+t	separatortchunk((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyt_parse_list¿s
cC@swd}i}xd|j|ƒD]S}|j|ƒ\}}}||krYtd|ƒ‚n|jƒ||jƒ<qW|S(uPRepresents value as a dict.

        :param value:
        :rtype: dict
        u=u(Unable to parse option value to dict: %s(RWt	partitionRR7(RTR+RUtresulttlinetkeytseptval((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyt_parse_dictÓscC@s|jƒ}|dkS(uQRepresents value as boolean.

        :param value:
        :rtype: bool
        u1utrueuyes(u1utrueuyes(tlower(RTR+((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyt_parse_boolåscC@sÇt|tƒs|Sd}|j|ƒs,|Stjƒ}|j|dƒjƒ}tjj|ƒ}|j|ƒs„t	d|ƒ‚ntjj
|ƒrÃtj|ddƒ}|j
ƒ}WdQXn|S(uURepresents value as a string, allowing including text
        from nearest files using `file:` directive.

        Directive is sandboxed and won't reach anything outside
        directory with setup.py.

        Examples:
            include: LICENSE
            include: src/file.txt

        :param str value:
        :rtype: str
        ufile:uu#`file:` directive can not access %stencodinguutf-8N(RPRR5R
RR6R7RRRRtiotopentread(RTR+tinclude_directiveRRtf((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyt_parse_fileïscC@s±d}|j|ƒs|S|j|dƒjƒjdƒ}|jƒ}dj|ƒ}|p^d}tjjdt	j
ƒƒzt|ƒ}t||ƒ}Wdtjdt_X|S(u·Represents value as a module attribute.

        Examples:
            attr: package.attr
            attr: package.module.attr

        :param str value:
        :rtype: str
        uattr:uu.u__init__iNi(
R5R6R7RStpoptjointsysRtinsertR
RRR$(RTR+tattr_directivet
attrs_patht	attr_nametmodule_nametmodule((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyt_parse_attrs!c@s‡fd†}|S(u¹Returns parser function to represents value as a list.

        Parses a value applying given methods one after another.

        :param parse_methods:
        :rtype: callable
        c@s'|}xˆD]}||ƒ}q
W|S(N((R+tparsedtmethod(t
parse_methods(s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyR.<s
((RTRtR.((Rts5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyt_get_parser_compound3s	cC@sLi}|pd„}x0|jƒD]"\}\}}||ƒ||<q"W|S(uÊParses section options into a dictionary.

        Optionally applies a given parser to values.

        :param dict section_options:
        :param callable values_parser:
        :rtype: dict
        cS@s|S(N((R]((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyt<lambda>Qs(R4(RTR;t
values_parserR+R[t_R]((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyt_parse_section_to_dictFs

cC@sIxB|jƒD]4\}\}}y|||<Wq
tk
r@q
Xq
WdS(uQParses configuration file section.

        :param dict section_options:
        N(R4RD(R9R;tnameRxR+((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyt
parse_sectionVs

cC@s‘xŠ|jjƒD]y\}}d}|r5d|}nt|d|jddƒdƒ}|dkrtd|j|fƒ‚n||ƒqWdS(uTParses configuration file items from one
        or more related sections.

        uu_%suparse_section%su.u__u0Unsupported distribution option section: [%s.%s]N(R8R4R$R6R%RR!(R9R:R;tmethod_postfixtsection_parser_method((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyR.bs
	N(R?t
__module__t__doc__R%R!RBRER<tpropertyR@ROtclassmethodRWR^R`RgRqRuRyR{R.(((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyR3ss"	&
%	R,cB@sNeZdZidd6dd6dd6dd6ZeZed	„ƒZd
„ZRS(umetadatauurlu	home_pageudescriptionusummaryuclassifiersu
classifieru	platformsuplatformcC@sk|j}|j}i
|d6|d6|d6|d6|d6|j||ƒd6|d6|d6|d	6|jd
6S(u.Metadata item name to parser function mapping.u	platformsukeywordsuprovidesurequiresu	obsoletesuclassifiersulicenseudescriptionulong_descriptionuversion(RWRgRut_parse_version(R9t
parse_listt
parse_file((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyR@Œs		cC@sq|j|ƒ}t|ƒr'|ƒ}nt|tƒsmt|dƒr`djtt|ƒƒ}qmd|}n|S(uSParses `version` option value.

        :param value:
        :rtype: str

        u__iter__u.u%s(RqtcallableRPRthasattrRitmaptstr(R9R+tversion((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyR‚Ÿs
(	R?R~R!RBREtstrict_modeR€R@R‚(((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyR,{s
R/cB@s\eZdZed„ƒZd„Zd„Zd„Zd„Zd„Z	d„Z
d„ZRS(	uoptionscC@s±|j}t|jddƒ}|j}|j}i|d6|d6|d6|d6|d6|d6|d	6|d
6|d6|d6|d
6|d6|d6|d6|jd6|jd6|d6S(u.Metadata item name to parser function mapping.RUu;uzip_safeuuse_2to3uinclude_package_dataupackage_diruuse_2to3_fixersuuse_2to3_exclude_fixersuconvert_2to3_doctestsuscriptsueager_resourcesudependency_linksunamespace_packagesuinstall_requiresusetup_requiresu
tests_requireupackagesuentry_pointsu
py_modules(RWRR`R^t_parse_packagesRg(R9Rƒtparse_list_semicolont
parse_boolt
parse_dict((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyR@¸s,			

cC@sZd}|j|ƒs"|j|ƒS|j|jjdiƒƒ}ddlm}||S(uTParses `packages` option value.

        :param value:
        :rtype: list
        ufind:u
packages.findi(t
find_packages(R5RWtparse_section_packages__findR8RCt
setuptoolsR(R9R+tfind_directivetfind_kwargsR((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyR‹Ôs
cC@s—|j||jƒ}dddg}tg|jƒD]*\}}||kr4|r4||f^q4ƒ}|jdƒ}|dk	r“|d|d<n|S(uœParses `packages.find` configuration file section.

        To be used in conjunction with _parse_packages().

        :param dict section_options:
        uwhereuincludeuexcludeiN(RyRWR R4RCR%(R9R;tsection_datat
valid_keystktvR“twhere((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyRçs@cC@s#|j||jƒ}||d<dS(u`Parses `entry_points` configuration file section.

        :param dict section_options:
        uentry_pointsN(RyRW(R9R;Rr((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pytparse_section_entry_pointsüscC@sB|j||jƒ}|jdƒ}|r>||d<|d=n|S(Nu*u(RyRWRC(R9R;Rrtroot((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyt_parse_package_datas

cC@s|j|ƒ|d<dS(u`Parses `package_data` configuration file section.

        :param dict section_options:
        upackage_dataN(R›(R9R;((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pytparse_section_package_datascC@s|j|ƒ|d<dS(uhParses `exclude_package_data` configuration file section.

        :param dict section_options:
        uexclude_package_dataN(R›(R9R;((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyt"parse_section_exclude_package_datascC@s/t|jddƒ}|j||ƒ|d<dS(ubParses `extras_require` configuration file section.

        :param dict section_options:
        RUu;uextras_requireN(RRWRy(R9R;Rƒ((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pytparse_section_extras_requires(R?R~R!R€R@R‹RR™R›RœRRž(((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyR/´s				
		(t
__future__RRRbR
RjtcollectionsRt	functoolsRtdistutils.errorsRRtsetuptools.py26compatRtsetuptools.extern.sixRRERRRtobjectR3R,R/(((s5/tmp/pip-build-NDUwcL/setuptools/setuptools/config.pyt<module>s.	ÿ	9