ó . ^c@@sZddlmZmZddlZddlZddlZddlZddlZddlm Z ddlm Z ddlm Z ddl m Z ddlmZmZddlmZmZdd lmZdd lmZmZeZeed „Zd „Zd „Zed„Zdfd„ƒYZ de fd„ƒYZ!de fd„ƒYZ"dS(i(tabsolute_importtunicode_literalsN(t defaultdict(tpartial(twraps(t import_module(tDistutilsOptionErrortDistutilsFileError(t LegacyVersiontparse(t SpecifierSet(t string_typestPY3c 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.distR RtostpathtabspathtisfileRtgetcwdtchdirtdirnametfind_config_filestappendtparse_config_filestparse_configurationtcommand_optionstconfiguration_to_dict( tfilepatht find_othersRR Rtcurrent_directorytdistRthandlers((s5/usr/lib/python2.7/dist-packages/setuptools/config.pytread_configurations$     cC@s@djtƒ}tjt||ƒ}t|||ƒ}|ƒS(u  Given a target object and option key, get that option from the target object, either through a get_{key} method or from an attribute directly. u get_{key}(tformattlocalst functoolsRtgetattr(t target_objtkeyt getter_namet by_attributetgetter((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyt _get_optionEscC@sXttƒ}xE|D]=}x4|jD])}t|j|ƒ}|||j|%su,u c3@sE|];}ˆj|ƒstrtjj|ƒrˆj|ƒVqdS(N(t _assert_localRQRRRt _read_file(RnR(R_(s5/usr/lib/python2.7/dist-packages/setuptools/config.pys 's(R[R R?tlenR^tjoin(R_R5tinclude_directivetspect filepaths((R_s5/usr/lib/python2.7/dist-packages/setuptools/config.pyt _parse_files cC@s,|jtjƒƒs(td|ƒ‚ndS(Nu#`file:` directive can not access %s(R?RRR(R((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyRo-scC@s,tj|ddƒ}|jƒSWdQXdS(Ntencodinguutf-8(tiotopentread(Rtf((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyRp3sc C@sed}|j|ƒs|S|j|dƒjƒjdƒ}|jƒ}dj|ƒ}|p^d}tjƒ}|r|d|krê||d}|jddƒ} t | ƒdkrátj jtjƒ| dƒ}| d}q|}qd|krtj jtjƒ|dƒ}qnt j j d|ƒzt |ƒ} t| |ƒ}Wdt j dt _ 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__iu/iN(R?R@RAR^tpopRrRRtrsplitRqRtsystinsertRR(( R_R5R9tattr_directivet attrs_patht attr_namet module_namet parent_patht custom_pathtpartstmodule((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyt _parse_attr8s0 !      % 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((R5tparsedtmethod(t parse_methods(s5/usr/lib/python2.7/dist-packages/setuptools/config.pyR ns ((R_R‹R ((R‹s5/usr/lib/python2.7/dist-packages/setuptools/config.pyt_get_parser_compoundes cC@sLi}|pd„}x0|jƒD]"\}\}}||ƒ||ƒt(R>(R_REt values_parserR5R*t_Rg((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyt_parse_section_to_dictxs cC@sIxB|jƒD]4\}\}}y|||RN(RCREtnameRR5((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyt parse_sectionˆs  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(RBR>R(R@RRRR1(RCRDREtmethod_postfixtsection_parser_method((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyR ”s   c@s%tˆƒ‡‡‡fd†ƒ}|S(ué this function will wrap around parameters that are deprecated :param msg: deprecation message :param warning_class: class of warning exception to be raised :param func: function to be wrapped around c@stjˆˆƒˆ||ŽS(N(twarningstwarn(targstkwargs(tfunctmsgt warning_class(s5/usr/lib/python2.7/dist-packages/setuptools/config.pytconfig_handler³s(R(RCRšR›RœR((RšR›Rœs5/usr/lib/python2.7/dist-packages/setuptools/config.pyt_deprecated_config_handler¬s!N(RIt __module__t__doc__RRR1RLRORFtpropertyRJRZt classmethodRbRhRjRmRvt staticmethodRoRpRˆRŒR‘R“R Rž(((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyR=~s,  & , R7cB@s]eZdZidd6dd6dd6dd6ZeZed d „Zed „ƒZ d „Z RS( umetadatauurlu home_pageu descriptionusummaryu classifiersu classifieru platformsuplatformcC@s)tt|ƒj|||ƒ||_dS(N(tsuperR7RFR9(RCR)R;RR9((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyRFÌscC@s |j}|j}|j}|j}i |d6|d6|d6|j|dtƒd6|d6|j||ƒd6|dƒd6|d 6|d 6|d 6|jd 6|d 6S(u.Metadata item name to parser function mapping.u platformsukeywordsuprovidesu[The requires parameter is deprecated, please use install_requires for runtime dependencies.urequiresu obsoletesu classifiersulicenseu license_filesu descriptionulong_descriptionuversionu project_urls(RbRvRhRmRžtDeprecationWarningRŒt_parse_version(RCt parse_listt parse_filet parse_dicttexclude_files_parser((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyRJÒs(       cC@sØ|j|ƒ}||kra|jƒ}tt|ƒtƒr]d}t|jtƒƒ‚n|S|j||j ƒ}t |ƒrŽ|ƒ}nt|t ƒsÔt |dƒrÇdj tt|ƒƒ}qÔd|}n|S(uSParses `version` option value. :param value: :rtype: str uCVersion loaded from {value} does not comply with PEP 440: {version}u__iter__u.u%s(RvRAR[R RRR%R&RˆR9tcallableR thasattrRrtmaptstr(RCR5tversionttmpl((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyR¦ís     N( RIRŸR1RLROt strict_modeRRRFR¡RJR¦(((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyR7»s  R6cB@seeZdZed„ƒZd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z RS( uoptionscC@s¸|j}t|jddƒ}|j}|j}i|d6|d6|d6|d6|d6|d6|d 6|d 6|d 6|d 6|d 6|d6|d6|d6|jd6|jd6|d6td6S(u.Metadata item name to parser function mapping.R`u;uzip_safeuuse_2to3uinclude_package_datau package_diruuse_2to3_fixersuuse_2to3_exclude_fixersuconvert_2to3_doctestsuscriptsueager_resourcesudependency_linksunamespace_packagesuinstall_requiresusetup_requiresu tests_requireupackagesu entry_pointsu py_modulesupython_requires(RbRRjRht_parse_packagesRvR (RCR§tparse_list_semicolont parse_boolR©((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyRJs.     cC@s®ddg}|jƒ}||kr1|j|ƒS||dk}|r]t r]tdƒ‚n|j|jjdiƒƒ}|r”ddlm}nddlm }||S( uTParses `packages` option value. :param value: :rtype: list ufind:ufind_namespace:iu8find_namespace: directive is unsupported on Python < 3.3u packages.findi(tfind_namespace_packages(t find_packages( RARbR Rtparse_section_packages__findRBRMt setuptoolsRµR¶(RCR5tfind_directivest trimmed_valuetfindnst find_kwargsR¶((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyR²2s      cC@s—|j||jƒ}dddg}tg|jƒD]*\}}||kr4|r4||f^q4ƒ}|jdƒ}|dk r“|d|dRMRR(RCREt section_datat valid_keystktvR¼twhere((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyR·Ns@ cC@s#|j||jƒ}||d||d<|d=n|S(Nu*u(R‘RbRM(RCRER‰troot((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyt_parse_package_dataks   cC@s|j|ƒ|d(RCRER‰R¿RÀ((s5/usr/lib/python2.7/dist-packages/setuptools/config.pytparse_section_data_filess( RIRŸR1R¡RJR²R·RÂRÄRÅRÆRÇRÈ(((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyR6s      (#t __future__RRRxRR~R–R't collectionsRRRt importlibRtdistutils.errorsRRt#setuptools.extern.packaging.versionRR t&setuptools.extern.packaging.specifiersR tsetuptools.extern.sixR R ttypet __metaclass__ROR$R.RRR=R7R6(((s5/usr/lib/python2.7/dist-packages/setuptools/config.pyts,     .  ÿ>V