N3{Y @sldZddlZddlZddlZddlZddlmZddlm Z ddl Z ddl m Z ddlmZmZmZddlmZdd d d d d dgZe jjZdZdZdgZdfddZejjZeeZGdd d eZeej_ejddZeej_e ede!ej"j#dZ$dS)z@Extensions to the 'distutils' for large or complex distributionsN)Command) convert_path) Extension) DistributionFeature_get_unpatched)Requiresetuprrrrr find_packagesTz lib2to3.fixes.cs.g}t|dfg}x|r|jd\}}xtj|D]}tjj||}d|kotjj|otjjtjj|d}|rI|j|||j|||dfqIqIWqWxGt |dgD]2ddl m fdd|D}qW|S) aReturn a list all Python packages found within directory 'where' 'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it will be converted to the appropriate local path syntax. 'exclude' is a sequence of package names to exclude; '*' can be used as a wildcard in the names, such that 'foo.*' will exclude all subpackages of 'foo' (but not 'foo' itself). rr z __init__.pyZez_setup) fnmatchcasecs%g|]}|s|qSr).0item)r patr./tmp/pip-r2rszybt-build/setuptools/__init__.py 7s z!find_packages..) rpoposlistdirpathjoinisdirisfileappendlistfnmatchr )whereexcludeoutstackprefixnamefnZlooks_like_packager)r rrr s   !& c@s:eZdZejZdZddZdddZdS)rFcKsAtj||x*|jD]\}}t|||qWdS)N)_Command__init__itemssetattr)selfdistkwkvrrrr&CszCommand.__init__rcKsFtj|||}x*|jD]\}}t|||q"W|S)N)r%reinitialize_commandr'r()r)commandreinit_subcommandsr+cmdr,r-rrrr.IszCommand.reinitialize_commandN)__name__ __module__ __qualname__r%__doc__Zcommand_consumes_argumentsr&r.rrrrr>s   csg}xtj|D]\}}tjksMjtjtjr`ddnrfdd|D}n|jttjj|qW|S)z^Find all files under 'dir' and return the list of full filenames (relative to 'dir'). Ncs%g|]}tjj|qSr)rrr)rf)baserrrZs zfindall..) rwalkcurdir startswithsepextendfilterrr)dirZ all_filesdirsfilesr)r8rfindallQs( rBdont_write_bytecodeZPYTHONDONTWRITEBYTECODE)%r5rsysdistutils.core distutilsdistutils.filelistrr%distutils.utilrZsetuptools.version setuptoolsZsetuptools.extensionrZsetuptools.distrrrZsetuptools.dependsr__all__version __version__Zbootstrap_install_fromZrun_2to3_on_doctestsZlib2to3_fixer_packagesr corer r:rBfilelistgetattrboolenvirongetZ_dont_write_bytecoderrrrs2