ó b-äQc@sÕdgZddlZddlZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZmZdd lmZmZdd lmZddlZddlZddlZddlZddlZddlZddlZd „ZeeƒZeefZd „Z d „Z!d„Z"d„Z#d„Z$d„Z%d„Z&d„Z'd„Z(d„Z)defd„ƒYZx)ej*ej+ej,fD]Z-ee-_q«Wdfd„ƒYZ.dS(t DistributioniÿÿÿÿN(R(tRequire(tinstall(tsdist(t install_lib(t numeric_typest basestring(tDistutilsOptionErrortDistutilsPlatformError(tDistutilsSetupErrorcCsNx"|jjdƒr$|j\}qW|jjdƒsJtd|ƒ‚n|S(s•Protect against re-patching the distutils if reloaded Also ensures that no other distutils extension monkeypatched the distutils first. t setuptoolst distutilss(distutils has already been patched by %r(t __module__t startswitht __bases__tAssertionError(tcls((s3/usr/lib/python2.7/site-packages/setuptools/dist.pyt_get_unpatcheds cCsTytjjd|ƒ}Wn3ttttfk rOtd||fƒ‚nXdS(Nsx=s4%r must be importable 'module:attrs' string (got %r)(t pkg_resourcest EntryPointtparset TypeErrort ValueErrortAttributeErrorRR (tdisttattrtvaluetep((s3/usr/lib/python2.7/site-packages/setuptools/dist.pytcheck_importable"scCs>yWn3ttttfk r9td||fƒ‚nXdS(s*Verify that value is a string list or Nones%%r must be a list of strings (got %r)N(RRRRR (RRR((s3/usr/lib/python2.7/site-packages/setuptools/dist.pytassert_string_list-s cCs›t|||ƒx„|D]|}|j|ƒsCtdd|ƒ‚nd|krdj|jdƒd ƒ}||kr“tjjd||ƒq“qqWdS(s(Verify that namespace packages are valids1Distribution contains no modules or packages for snamespace package %rt.iÿÿÿÿs^WARNING: %r is declared as a package namespace, but %r is not: please correct this in setup.pyN(Rthas_contents_forR tjointsplitR tlogtwarn(RRRtnsptparent((s3/usr/lib/python2.7/site-packages/setuptools/dist.pyt check_nsp5s    cCsªy}xv|jƒD]h\}}d|kre|jddƒ\}}tj|ƒretd|ƒ‚qenttj|ƒƒqWWn&ttt fk r¥tdƒ‚nXdS(s+Verify that extras_require mapping is validt:isInvalid environment marker: s‹'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.N( titemsR!Rtinvalid_markerR tlisttparse_requirementsRRR(RRRtktvtm((s3/usr/lib/python2.7/site-packages/setuptools/dist.pyt check_extrasFs cCs/t|ƒ|kr+td||fƒ‚ndS(s)Verify that value is True, False, 0, or 1s#%r must be a boolean value (got %r)N(tboolR (RRR((s3/usr/lib/python2.7/site-packages/setuptools/dist.pyt assert_boolVscCsHyttj|ƒƒWn*ttfk rCtd|fƒ‚nXdS(s9Verify that install_requires is a valid requirements lists^%r must be a string or list of strings containing valid project/version requirement specifiersN(R*RR+RRR (RRR((s3/usr/lib/python2.7/site-packages/setuptools/dist.pytcheck_requirements\s cCsHytjj|ƒWn-tk rCtjƒd}t|ƒ‚nXdS(s)Verify that entry_points map is parseableiN(RRt parse_mapRtsystexc_infoR (RRRte((s3/usr/lib/python2.7/site-packages/setuptools/dist.pytcheck_entry_pointses  cCs"t|tƒstdƒ‚ndS(Nstest_suite must be a string(t isinstanceRR (RRR((s3/usr/lib/python2.7/site-packages/setuptools/dist.pytcheck_test_suitemscCs}t|tƒrixW|jƒD]B\}}t|tƒs;Pnyt|ƒWqtk r]PqXqWdSnt|dƒ‚dS(s@Verify that value is a dictionary of package names to glob listsNsI must be a dictionary mapping package names to lists of wildcard patterns(R8tdictR(tstrtiterRR (RRRR,R-((s3/usr/lib/python2.7/site-packages/setuptools/dist.pytcheck_package_dataqs  cCs=x6|D].}tjd|ƒstjjd|ƒqqWdS(Ns \w+(\.\w+)*sZWARNING: %r not a valid package name; please use only.-separated package names in setup.py(tretmatchR R"R#(RRRtpkgname((s3/usr/lib/python2.7/site-packages/setuptools/dist.pytcheck_packages€s   cBsøeZdZdZd„Zdd„Zd„Zd„Zd„Z d„Z d„Z d„Z d „Z d „Zd „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(sxDistribution with support for features, tests, and package data This is an enhanced version of 'distutils.dist.Distribution' that effectively adds the following new optional keyword arguments to 'setup()': 'install_requires' -- a string or sequence of strings specifying project versions that the distribution requires when installed, in the format used by 'pkg_resources.require()'. They will be installed automatically when the package is installed. If you wish to use packages that are not available in PyPI, or want to give your users an alternate download location, you can add a 'find_links' option to the '[easy_install]' section of your project's 'setup.cfg' file, and then setuptools will scan the listed web pages for links that satisfy the requirements. 'extras_require' -- a dictionary mapping names of optional "extras" to the additional requirement(s) that using those extras incurs. For example, this:: extras_require = dict(reST = ["docutils>=0.3", "reSTedit"]) indicates that the distribution can optionally provide an extra capability called "reST", but it can only be used if docutils and reSTedit are installed. If the user installs your package using EasyInstall and requests one of your extras, the corresponding additional requirements will be installed if needed. 'features' -- a dictionary mapping option names to 'setuptools.Feature' objects. Features are a portion of the distribution that can be included or excluded based on user options, inter-feature dependencies, and availability on the current system. Excluded features are omitted from all setup commands, including source and binary distributions, so you can create multiple distributions from the same source tree. Feature names should be valid Python identifiers, except that they may contain the '-' (minus) sign. Features can be included or excluded via the command line options '--with-X' and '--without-X', where 'X' is the name of the feature. Whether a feature is included by default, and whether you are allowed to control this from the command line, is determined by the Feature object. See the 'Feature' class for more information. 'test_suite' -- the name of a test suite to run for the 'test' command. If the user runs 'python setup.py test', the package will be installed, and the named test suite will be run. The format is the same as would be used on a 'unittest.py' command line. That is, it is the dotted name of an object to import and call to generate a test suite. 'package_data' -- a dictionary mapping package names to lists of filenames or globs to use to find data files contained in the named packages. If the dictionary has filenames or globs listed under '""' (the empty string), those names will be searched for in every package, in addition to any names for the specific package. Data files found using these names/globs will be installed along with the package, in the same location as the package. Note that globs are allowed to reference the contents of non-package subdirectories, as long as you use '/' as a path separator. (Globs are automatically converted to platform-specific paths at runtime.) In addition to these new keywords, this class also has several new methods for manipulating the distribution's contents. For example, the 'include()' and 'exclude()' methods can be thought of as in-place add and subtract commands that add or remove packages, modules, extensions, and so on from the distribution. They are used by the feature subsystem to configure the distribution for the included and excluded features. cCsŸ| sd|ksd|kr#dStjt|dƒƒjƒ}tjjj|ƒ}|dk r›|jdƒ r›tj t|dƒƒ|_ ||_ ndS(NtnametversionsPKG-INFO( Rt safe_nameR;tlowert working_settby_keytgettNonet has_metadatat safe_versiont_versiont _patched_dist(tselftattrstkeyR((s3/usr/lib/python2.7/site-packages/setuptools/dist.pytpatch_missing_pkg_infoîscCsLt|dƒ}|s!i|_ng|_i|_g|_|oQ|jddƒ|_|j|ƒ|dk r›|jdgƒ|_ t |d|j ƒn|rÆd|krÆ|j |jdƒƒnx?t j dƒD].}t||jƒsÖt||jdƒqÖqÖWtj||ƒt|jjtƒrHt|jjƒ|j_ndS(Nt package_datatsrc_roottdependency_linkstsetup_requiressdistutils.setup_keywords(thasattrRRtrequire_featurestfeaturest dist_filestpopRIRSRQRTRtfetch_build_eggsRtiter_entry_pointsRBtsetattrt _Distributiont__init__R8tmetadataRCRR;(RNROthave_package_dataR((s3/usr/lib/python2.7/site-packages/setuptools/dist.pyR_ûs&      cCs)tj|ƒ}|jr%|jƒn|S(s3Process features after parsing command line options(R^tparse_command_lineRXt_finalize_features(RNtresult((s3/usr/lib/python2.7/site-packages/setuptools/dist.pyRbs  cCsd|jddƒS(s;Convert feature name to corresponding option attribute nametwith_t-t_(treplace(RNRB((s3/usr/lib/python2.7/site-packages/setuptools/dist.pyt_feature_attrnamescCsPddlm}m}x3|j||ƒd|jƒD]}|j|ƒq5WdS(sResolve pre-setup requirementsiÿÿÿÿ(RFR+t installerN(RRFR+tresolvetfetch_build_eggtadd(RNtrequiresRFR+R((s3/usr/lib/python2.7/site-packages/setuptools/dist.pyR[s cCsÚtj|ƒ|jr#|jƒnxgtjdƒD]V}t||jdƒ}|dk r3|j d|j ƒ|j ƒ||j|ƒq3q3Wt|ddƒrÍg|j D]}t jj|ƒ^q©|_ n g|_ dS(Nsdistutils.setup_keywordsRjtconvert_2to3_doctests(R^tfinalize_optionsRXt_set_global_opts_from_featuresRR\tgetattrRBRItrequireRltloadRotostpathtabspath(RNRRtp((s3/usr/lib/python2.7/site-packages/setuptools/dist.pyRp%s     .c Cs]y|j}g|j_Wn4tk rOddlm}|jidgd6ƒ}|jƒ|jdƒ}d}x*|j ƒD]}||kr~||=q~q~W|j rë|j }d|krØ|dd j ƒ|}nd |f|dR4tdistutils.coreRR^tsetuptools.dependsRtsetuptools.command.installRtsetuptools.command.sdistRtsetuptools.command.install_libRtsetuptools.compatRRtdistutils.errorsRRR R RR tdistutils.distt distutils.cmdRut distutils.logRRáR*RÃRRR&R/R1R2R7R9R=RARtcoreR™RàR÷(((s3/usr/lib/python2.7/site-packages/setuptools/dist.pyts>   <           )ÿÿ.