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:
B

»Oa9Ì9,Çã@sddlZddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ddlm
Z
ddlmZddl
Z
ddlmZmZddlmZmZddlmZGd	d
„d
ƒZe
jdd„ƒZddd„Zdd„Zdd„Zddd„ZGdd„dƒZGdd„deƒZGdd„deƒZdS)éN)Údefaultdict)Úpartial)Úwraps)Úiglob)ÚDistutilsOptionErrorÚDistutilsFileError)ÚVersionÚInvalidVersion)ÚSpecifierSetc@s eZdZdZdd„Zdd„ZdS)ÚStaticModulez0
    Attempt to load the module by the name
    c	CsLtj |¡}t|jƒ}| ¡}WdQRXt |¡}t|ƒ 	t
ƒ¡|`dS)N)Ú	importlibÚutilÚ	find_specÚopenÚoriginÚreadÚastÚparseÚvarsÚupdateÚlocalsÚself)rÚnameÚspecÚstrmÚsrcÚmodule©rú/build/wlanpi-profiler-7At3M6/wlanpi-profiler-1.0.10/debian/wlanpi-profiler/opt/wlanpi-profiler/lib/python3.7/site-packages/setuptools/config.pyÚ__init__s
zStaticModule.__init__c
sVyt‡fdd„|jjDƒƒStk
rP}ztdjftƒŽƒ|‚Wdd}~XYnXdS)Nc3sH|]@}t|tjƒr|jD](}t|tjƒr|jˆkrt |j¡VqqdS)N)Ú
isinstancerZAssignÚtargetsÚNameÚidÚliteral_evalÚvalue)Ú.0Z	statementÚtarget)Úattrrrú	<genexpr>$s
z+StaticModule.__getattr__.<locals>.<genexpr>z#{self.name} has no attribute {attr})ÚnextrÚbodyÚ	ExceptionÚAttributeErrorÚformatr)rr(Úer)r(rÚ__getattr__!s
zStaticModule.__getattr__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rr0rrrrrsrc	cs,ztj d|¡dVWdtj |¡XdS)zH
    Add path to front of sys.path for the duration of the context.
    rN)ÚsysÚpathÚinsertÚremove)r6rrrÚ
patch_path0s
r9Fc		Cs®ddlm}m}tj |¡}tj |¡s4td|ƒ‚t ¡}t 	tj 
|¡¡zJ|ƒ}|rb| ¡ng}||krx| |¡|j
||dt||j|d}Wdt 	|¡Xt|ƒS)a,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
    r)ÚDistributionÚ
_Distributionz%Configuration file %s does not exist.)Ú	filenames)Úignore_option_errorsN)Zsetuptools.distr:r;Úosr6ÚabspathÚisfilerÚgetcwdÚchdirÚdirnameÚfind_config_filesÚappendÚparse_config_filesÚparse_configurationÚcommand_optionsÚconfiguration_to_dict)	ÚfilepathZfind_othersr=r:r;Zcurrent_directoryÚdistr<ÚhandlersrrrÚread_configuration<s 
rMcCs.djftƒŽ}t t||¡}t|||ƒ}|ƒS)z 
    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.
    z	get_{key})r.rÚ	functoolsrÚgetattr)Ú
target_objÚkeyZgetter_nameZby_attributeÚgetterrrrÚ_get_optionisrScCsDttƒ}x6|D].}x(|jD]}t|j|ƒ}|||j|<qWqW|S)z»Returns configuration data gathered by given handlers as a dict.

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

    :rtype: dict
    )rÚdictÚset_optionsrSrPÚsection_prefix)rLZconfig_dictÚhandlerÚoptionr%rrrrIus
rIcCs6t|||ƒ}| ¡t|j|||jƒ}| ¡||fS)aÒ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
    )ÚConfigOptionsHandlerrÚConfigMetadataHandlerÚmetadataÚpackage_dir)ÚdistributionrHr=ÚoptionsÚmetarrrrG‡srGc@sÚeZdZdZdZiZd'dd„Zedd„ƒZdd	„Z	e
d(dd„ƒZe
d)d
d„ƒZe
dd„ƒZ
e
dd„ƒZe
dd„ƒZe
dd„ƒZedd„ƒZedd„ƒZe
d*dd„ƒZe
dd„ƒZe
d+dd „ƒZd!d"„Zd#d$„Zd%d&„ZdS),Ú
ConfigHandlerz1Handles metadata supplied in configuration files.NFcCsbi}|j}x:| ¡D].\}}| |¡s(q| |d¡ d¡}|||<qW||_||_||_g|_dS)NÚÚ.)	rVÚitemsÚ
startswithÚreplaceÚstripr=rPÚsectionsrU)rrPr^r=rgrVÚsection_nameÚsection_optionsrrrr³s
zConfigHandler.__init__cCstd|jjƒ‚dS)z.Metadata item name to parser function mapping.z!%s must provide .parsers propertyN)ÚNotImplementedErrorÚ	__class__r1)rrrrÚparsersÃszConfigHandler.parsersc	CsÆtƒ}|j}|j ||¡}t|||ƒ}||kr6t|ƒ‚|r>dSd}|j |¡}|r€y||ƒ}Wn tk
r~d}|jsz‚YnX|rˆdSt|d|dƒ}|dkr®t	|||ƒn||ƒ|j
 |¡dS)NFTzset_%s)ÚtuplerPÚaliasesÚgetrOÚKeyErrorrlr,r=ÚsetattrrUrE)	rZoption_namer%ÚunknownrPZ
current_valueZskip_optionÚparserÚsetterrrrÚ__setitem__Ês0zConfigHandler.__setitem__ú,cCs8t|tƒr|Sd|kr | ¡}n
| |¡}dd„|DƒS)z×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
        Ú
cSsg|]}| ¡r| ¡‘qSr)rf)r&Úchunkrrrú
<listcomp>sz-ConfigHandler._parse_list.<locals>.<listcomp>)r ÚlistÚ
splitlinesÚsplit)Úclsr%Ú	separatorrrrÚ_parse_listðs



zConfigHandler._parse_listc	snd}|jˆ|d}g}xR|D]J‰t‡fdd„|Dƒƒr\| tdd„ttj ˆ¡ƒDƒƒ¡q| ˆ¡qW|S)aEquivalent to _parse_list() but expands any glob patterns using glob().

        However, unlike with glob() calls, the results remain relative paths.

        :param value:
        :param separator: List items separator character.
        :rtype: list
        )Ú*ú?ú[ú]Ú{Ú})r~c3s|]}|ˆkVqdS)Nr)r&Úchar)r%rrr)sz1ConfigHandler._parse_list_glob.<locals>.<genexpr>css |]}tj |t ¡¡VqdS)N)r>r6ÚrelpathrA)r&r6rrrr)s)	rÚanyÚextendÚsortedrr>r6r?rE)r}r%r~Zglob_charactersÚvaluesZexpanded_valuesr)r%rÚ_parse_list_globs

zConfigHandler._parse_list_globcCsTd}i}xF| |¡D]8}| |¡\}}}||kr<td|ƒ‚| ¡|| ¡<qW|S)zPRepresents value as a dict.

        :param value:
        :rtype: dict
        ú=z(Unable to parse option value to dict: %s)rÚ	partitionrrf)r}r%r~ÚresultÚlinerQÚsepÚvalrrrÚ_parse_dict s
zConfigHandler._parse_dictcCs| ¡}|dkS)zQRepresents value as boolean.

        :param value:
        :rtype: bool
        )Ú1ÚtrueÚyes)Úlower)r}r%rrrÚ_parse_bool3szConfigHandler._parse_boolcs‡fdd„}|S)zßReturns a parser function to make sure field inputs
        are not files.

        Parses a value after getting the key so error messages are
        more informative.

        :param key:
        :rtype: callable
        cs d}| |¡rtd ˆ¡ƒ‚|S)Nzfile:zCOnly strings are accepted for the {0} field, files are not accepted)rdÚ
ValueErrorr.)r%Zexclude_directive)rQrrrsIs
z3ConfigHandler._exclude_files_parser.<locals>.parserr)r}rQrsr)rQrÚ_exclude_files_parser=s	z#ConfigHandler._exclude_files_parsercs\d}t|tƒs|S| |¡s |S|t|ƒd…}dd„| d¡Dƒ}d ‡fdd„|Dƒ¡S)aORepresents 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:
            file: README.rst, CHANGELOG.md, src/file.txt

        :param str value:
        :rtype: str
        zfile:Ncss|]}tj | ¡¡VqdS)N)r>r6r?rf)r&r6rrrr)ksz,ConfigHandler._parse_file.<locals>.<genexpr>rvrwc3s.|]&}ˆ |¡stj |¡rˆ |¡VqdS)TN)Ú
_assert_localr>r6r@Ú
_read_file)r&r6)r}rrr)ms)r ÚstrrdÚlenr|Újoin)r}r%Zinclude_directiverZ	filepathsr)r}rÚ_parse_fileTs


zConfigHandler._parse_filecCs| t ¡¡std|ƒ‚dS)Nz#`file:` directive can not access %s)rdr>rAr)rJrrrr›rszConfigHandler._assert_localc	Cs"tj|dd
}| ¡SQRXdS)Nzutf-8)Úencoding)Úiorr)rJÚfrrrrœwszConfigHandler._read_filec	Csd}| |¡s|S| |d¡ ¡ d¡}| ¡}d |¡}|p@d}t ¡}|rÂ|d|kr¤||d}| dd¡}	t	|	ƒdkržtj
 t ¡|	d¡}|	d}qÂ|}nd|krÂtj
 t ¡|d¡}t|ƒ4ytt
|ƒ|ƒStk
røt |¡}
YnXWdQRXt|
|ƒS)	z·Represents value as a module attribute.

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

        :param str value:
        :rtype: str
        zattr:rarbrrú/éN)rdrerfr|ÚpoprŸr>rAÚrsplitržr6r9rOrr,rÚ
import_module)r}r%r\Zattr_directiveZ
attrs_pathÚ	attr_nameÚmodule_nameÚparent_pathZcustom_pathÚpartsrrrrÚ_parse_attr|s0



zConfigHandler._parse_attrcs‡fdd„}|S)z¹Returns parser function to represents value as a list.

        Parses a value applying given methods one after another.

        :param parse_methods:
        :rtype: callable
        cs|}xˆD]}||ƒ}q
W|S)Nr)r%ÚparsedÚmethod)Ú
parse_methodsrrr´s
z1ConfigHandler._get_parser_compound.<locals>.parser)r}r°rr)r°rÚ_get_parser_compoundªs
z"ConfigHandler._get_parser_compoundcCs:i}|pdd„}x$| ¡D]\}\}}||ƒ||<qW|S)zÊParses section options into a dictionary.

        Optionally applies a given parser to values.

        :param dict section_options:
        :param callable values_parser:
        :rtype: dict
        cSs|S)Nr)r’rrrÚ<lambda>Éóz6ConfigHandler._parse_section_to_dict.<locals>.<lambda>)rc)r}riZ
values_parserr%rQÚ_r’rrrÚ_parse_section_to_dict¾s

z$ConfigHandler._parse_section_to_dictc	Cs@x:| ¡D].\}\}}y|||<Wq
tk
r6Yq
Xq
WdS)zQParses configuration file section.

        :param dict section_options:
        N)rcrp)rrirr´r%rrrÚ
parse_sectionÎs
zConfigHandler.parse_sectioncCsfx`|j ¡D]R\}}d}|r$d|}t|d| dd¡dƒ}|dkrVtd|j|fƒ‚||ƒqWdS)zTParses configuration file items from one
        or more related sections.

        raz_%szparse_section%srbÚ__Nz0Unsupported distribution option section: [%s.%s])rgrcrOrerrV)rrhriZmethod_postfixZsection_parser_methodrrrrÚszConfigHandler.parsecstˆƒ‡‡‡fdd„ƒ}|S)zè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
        cst ˆˆ¡ˆ||ŽS)N)ÚwarningsÚwarn)ÚargsÚkwargs)ÚfuncÚmsgÚ
warning_classrrÚconfig_handlerüsz@ConfigHandler._deprecated_config_handler.<locals>.config_handler)r)rr¼r½r¾r¿r)r¼r½r¾rÚ_deprecated_config_handlerôsz(ConfigHandler._deprecated_config_handler)F)rv)rv)N)N)r1r2r3r4rVrnrÚpropertyrlruÚclassmethodrrŒr“r˜ršr Ústaticmethodr›rœr­r±rµr¶rrÀrrrrr`£s0
&
-r`csHeZdZdZdddddœZdZd‡fd	d
„	Zedd„ƒZd
d„Z	‡Z
S)rZr[ÚurlÚdescriptionÚclassifiersÚ	platforms)Z	home_pageÚsummaryÚ
classifierÚplatformFNcstt|ƒ |||¡||_dS)N)ÚsuperrZrr\)rrPr^r=r\)rkrrrs

zConfigMetadataHandler.__init__cCs^|j}|j}|j}|j}|||| |dt¡|| ||¡|dƒ| |dƒdt¡||||j|dœ
S)z.Metadata item name to parser function mapping.z[The requires parameter is deprecated, please use install_requires for runtime dependencies.ÚlicenseÚlicense_filezDThe license_file parameter is deprecated, use license_files instead.)
rÇÚkeywordsÚprovidesÚrequiresÚ	obsoletesrÆrÌrÍZ
license_filesrÅÚlong_descriptionÚversionZproject_urls)rr r“ršrÀÚDeprecationWarningr±Ú_parse_version)rÚ
parse_listZ
parse_fileÚ
parse_dictZexclude_files_parserrrrrls.
zConfigMetadataHandler.parserscCs¤| |¡}||krV| ¡}yt|ƒWn*tk
rPd}t|jftƒŽƒ‚YnX|S| ||j¡}t	|ƒrr|ƒ}t
|tƒs t|dƒr˜d 
tt|ƒ¡}nd|}|S)zSParses `version` option value.

        :param value:
        :rtype: str

        zCVersion loaded from {value} does not comply with PEP 440: {version}Ú__iter__rbz%s)r rfrr	rr.rr­r\Úcallabler rÚhasattrrŸÚmap)rr%rÓÚtmplrrrrÕ?s"


z$ConfigMetadataHandler._parse_version)FN)r1r2r3rVrnZstrict_moderrÁrlrÕÚ
__classcell__rr)rkrrZs"rZc@sdeZdZdZedd„ƒZdd„Zdd„Zdd	„Zd
d„Z	dd
„Z
dd„Zdd„Zdd„Z
dd„ZdS)rYr^cCsN|j}t|jdd}|j}|j}|j}|||||||||||j|j|t|dœS)z.Metadata item name to parser function mapping.ú;)r~)Zzip_safeZinclude_package_datar\ÚscriptsZeager_resourcesZdependency_linksZnamespace_packagesZinstall_requiresZsetup_requiresZ
tests_requireÚpackagesÚentry_pointsÚ
py_modulesZpython_requiresÚcmdclass)rrr˜r“Ú_parse_cmdclassÚ_parse_packagesr r
)rrÖZparse_list_semicolonZ
parse_boolr×Zparse_cmdclassrrrrlis(zConfigOptionsHandler.parserscs$dd„‰‡fdd„| |¡ ¡DƒS)NcSs8| d¡}||dd…}|d|…}t|ƒ}t||ƒS)Nrbr¥)ÚrfindÚ
__import__rO)Zqualified_class_nameÚidxÚ
class_nameÚpkg_namerrrrÚ
resolve_class…s

z;ConfigOptionsHandler._parse_cmdclass.<locals>.resolve_classcsi|]\}}ˆ|ƒ|“qSrr)r&ÚkÚv)rërrú
<dictcomp>Žsz8ConfigOptionsHandler._parse_cmdclass.<locals>.<dictcomp>)r“rc)rr%r)rërrä„s	z$ConfigOptionsHandler._parse_cmdclasscCsjddg}| ¡}||kr"| |¡S||dk}| |j di¡¡}|rTddlm}nddlm}|f|ŽS)zTParses `packages` option value.

        :param value:
        :rtype: list
        zfind:zfind_namespace:r¥z
packages.findr)Úfind_namespace_packages)Ú
find_packages)rfrÚparse_section_packages__findrgroÚ
setuptoolsrïrð)rr%Zfind_directivesZ
trimmed_valueZfindnsÚfind_kwargsrðrrrrås
z$ConfigOptionsHandler._parse_packagescsT| ||j¡}dddg‰t‡fdd„| ¡Dƒƒ}| d¡}|dk	rP|d|d<|S)zœParses `packages.find` configuration file section.

        To be used in conjunction with _parse_packages().

        :param dict section_options:
        ÚwhereÚincludeÚexcludecs$g|]\}}|ˆkr|r||f‘qSrr)r&rìrí)Ú
valid_keysrrry¶szEConfigOptionsHandler.parse_section_packages__find.<locals>.<listcomp>Nr)rµrrTrcro)rriZsection_datarórôr)r÷rrñªs

z1ConfigOptionsHandler.parse_section_packages__findcCs| ||j¡}||d<dS)z`Parses `entry_points` configuration file section.

        :param dict section_options:
        ráN)rµr)rrir®rrrÚparse_section_entry_points¿sz/ConfigOptionsHandler.parse_section_entry_pointscCs.| ||j¡}| d¡}|r*||d<|d=|S)Nr€ra)rµrro)rrir®ÚrootrrrÚ_parse_package_dataÇs
z(ConfigOptionsHandler._parse_package_datacCs| |¡|d<dS)z`Parses `package_data` configuration file section.

        :param dict section_options:
        Úpackage_dataN)rú)rrirrrÚparse_section_package_dataÑsz/ConfigOptionsHandler.parse_section_package_datacCs| |¡|d<dS)zhParses `exclude_package_data` configuration file section.

        :param dict section_options:
        Zexclude_package_dataN)rú)rrirrrÚ"parse_section_exclude_package_dataØsz7ConfigOptionsHandler.parse_section_exclude_package_datacCs"t|jdd}| ||¡|d<dS)zbParses `extras_require` configuration file section.

        :param dict section_options:
        rÞ)r~Zextras_requireN)rrrµ)rrirÖrrrÚparse_section_extras_requireßsz1ConfigOptionsHandler.parse_section_extras_requirecCs(| ||j¡}dd„| ¡Dƒ|d<dS)z^Parses `data_files` configuration file section.

        :param dict section_options:
        cSsg|]\}}||f‘qSrr)r&rìrírrrryïszAConfigOptionsHandler.parse_section_data_files.<locals>.<listcomp>Ú
data_filesN)rµrŒrc)rrir®rrrÚparse_section_data_filesész-ConfigOptionsHandler.parse_section_data_filesN)r1r2r3rVrÁrlrärårñrørúrürýrþrrrrrrYes

rY)FF)F) rr¢r>r5r¸rNrÚcollectionsrrrÚglobrÚ
contextlibÚdistutils.errorsrrZ#setuptools.extern.packaging.versionrr	Z&setuptools.extern.packaging.specifiersr
rÚcontextmanagerr9rMrSrIrGr`rZrYrrrrÚ<module>s2
-
ca