OwlCyberSecurity - MANAGER
Edit File: sdist.pyo
� {fc�����������@���s��d��Z��d�Z�d�d�l�Z�d�d�l�Z�d�d�l�Z�d�d�l�m�Z�d�d�l�m�Z�d�d�l�m �Z �d�d�l �m�Z�m�Z�m �Z �m�Z�d�d�l�m�Z�d�d �l�m�Z�m�Z�m�Z�d�d �l�m�Z�d�d�l �m�Z�d�d�l�m�Z�d ����Z�d�e �f�d�������YZ�d�S(���sa���distutils.command.sdist Implements the Distutils 'sdist' command (create a source distribution).s���$Id$i����N(���t���glob(���t���warn(���t���Command(���t���dir_utilt���dep_utilt ���file_utilt���archive_util(���t���TextFile(���t���DistutilsPlatformErrort���DistutilsOptionErrort���DistutilsTemplateError(���t���FileList(���t���log(���t���convert_pathc����������C���s����d�d�l��m�}��d�d�l�m�}�g��}�x6�|�j����D](�}�|�j�d�|�d�|�|�d�f���q3�W|�j����|��|���j�d���d�S(���so���Print all possible values for the 'formats' option (used by the "--help-formats" command-line option). i����(���t���FancyGetopt(���t���ARCHIVE_FORMATSs���formats=i���s.���List of available source distribution formats:N( ���t���distutils.fancy_getoptR���t���distutils.archive_utilR���t���keyst���appendt���Nonet���sortt ���print_help(���R���R���t���formatst���format(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyt���show_formats���s���� t���sdistc�����������B���s6��e��Z�d��Z�d����Z�d<�d=�d?�d@�dA�dB�dC�dD�dE�d�d�d�d�f�dF�dG�dH�dI�g�Z�d�d�d�d�d�d�g�Z�d'�d>�d(�e�f�g�Z�i�d�d �6d�d�6Z �i�d)�d*�6d+�d,�6Z �d-�e�f�g�Z�d.����Z�d/����Z �d0����Z�d1����Z�d2����Z�d3����Z�d4����Z�d5����Z�d6����Z�d7����Z�d8����Z�d9����Z�d:����Z�d;����Z�RS(J���s6���create a source distribution (tarball, zip file, etc.)c���������C���s���|��j��S(���sY���Callable used for the check sub-command. Placed here so user_options can view it(���t���metadata_check(���t���self(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyt���checking_metadata(���s����s ���template=t���ts5���name of manifest template file [default: MANIFEST.in]s ���manifest=t���ms)���name of manifest file [default: MANIFEST]s���use-defaultssR���include the default file set in the manifest [default; disable with --no-defaults]s���no-defaultss"���don't include the default file sett���prunes����specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune]s���no-prunes$���don't automatically exclude anythings ���manifest-onlyt���osE���just regenerate the manifest and then stop (implies --force-manifest)s���force-manifestt���fsk���forcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.s���formats=s6���formats for source distribution (comma-separated list)s ���keep-tempt���ks1���keep the distribution tree around after creating s���archive file(s)s ���dist-dir=t���dsF���directory to put the source distribution archive(s) in [default: dist]s���metadata-checks[���Ensure that all required elements of meta-data are supplied. Warn if any missing. [default]s���owner=t���us@���Owner name used when creating a tar file [default: current user]s���group=t���gsA���Group name used when creating a tar file [default: current group]s���help-formatss#���list available distribution formatst���gztart���posixt���zipt���ntt���checkc���������C���sy���d��|��_�d��|��_�d�|��_�d�|��_�d�|��_�d�|��_�d��|��_�d�|��_�d��|��_ �d��|��_ �d�|��_�d��|��_�d��|��_ �d��S(���Ni���i����(���R���t���templatet���manifestt���use_defaultsR ���t ���manifest_onlyt���force_manifestR���t ���keep_tempt���dist_dirt ���archive_filesR���t���ownert���group(���R���(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyt���initialize_optionsf���s���� c���������C���s����|��j��d��k�r�d�|��_��n��|��j�d��k�r6�d�|��_�n��|��j�d���|��j�d��k�r��y�|��j�t�j�g�|��_�Wq��t�k �r��t �d�d�t�j���q��Xn��t �j�|��j���}�|�r��t�d�|���n��|��j �d��k�r��d�|��_ �n��d��S(���Nt���MANIFESTs���MANIFEST.inR���s.���don't know how to create source distributions s���on platform %ss���unknown archive format '%s't���dist(���R-���R���R,���t���ensure_string_listR���t���default_formatt���ost���namet���KeyErrorR���R���t���check_archive_formatsR ���R2���(���R���t ���bad_format(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyt���finalize_options}���s$���� c���������C���sU���t�����|��_�x!�|��j����D]�}�|��j�|���q�W|��j����|��j�rG�d��S|��j����d��S(���N(���R���t���filelistt���get_sub_commandst���run_commandt ���get_file_listR/���t���make_distribution(���R���t���cmd_name(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyt���run����s���� c���������C���s7���t��d�t���|��j�j�d���}�|�j����|�j����d�S(���s���Deprecated API.sa���distutils.command.sdist.check_metadata is deprecated, use the check command insteadR+���N(���R���t���PendingDeprecationWarningt���distributiont���get_command_objt���ensure_finalizedRG���(���R���R+���(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyt���check_metadata����s ���� c���������C���s����t��j�j�|��j���}�|�rP�|��j����rP�|��j����|��j�j����|��j�j����d�S|�sq�|��j �d�d�|��j���n��|��j�j ����|��j�r��|��j����n��|�r��|��j ����n��|��j�r��|��j����n��|��j�j����|��j�j����|��j����d�S(���sC��Figure out the list of files to include in the source distribution, and put it in 'self.filelist'. This might involve reading the manifest template (and writing the manifest), or just reading the manifest, or just using the default file set -- it all depends on the user's options. Ns&���manifest template '%s' does not exist s���(using default file list)(���R;���t���patht���isfileR,���t���_manifest_is_not_generatedt ���read_manifestRA���R���t���remove_duplicatesR���t���findallR.���t���add_defaultst ���read_templateR ���t���prune_file_listt���write_manifest(���R���t���template_exists(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyRD�������s(���� c���������C���s��d�|��j��j�g�}�x��|�D]��}�t�|�t���r��|�}�d�}�x:�|�D]2�}�t�j�j�|���rA�d�}�|��j�j�|���PqA�qA�W|�s��|��j �d�t �j�|�d�����q��q�t�j�j�|���r��|��j�j�|���q�|��j �d�|���q�Wd�d �g�}�xB�|�D]:�}�t�t�j�j �t�|�����}�|�r��|��j�j�|���q��q��W|��j�d ���}�|��j��j����rb|��j�j�|�j������n��xM�|�j�D]B�\�} �} �}�}�x-�|�D]%�} �|��j�j�t�j�j�| �| �����q�WqlW|��j��j����rlx��|��j��j�D]��}�t�|�t���rt�|���}�t�j�j �|���re|��j�j�|���qeq�|�\�}�}�x?�|�D]7�}�t�|���}�t�j�j �|���r*|��j�j�|���q*q*Wq�Wn��|��j��j����r�|��j�d���}�|��j�j�|�j������n��|��j��j����r�|��j�d���}�|��j�j�|�j������n��|��j��j����r|��j�d ���}�|��j�j�|�j������n��d�S(���s9��Add all the default files to self.filelist: - README or README.txt - setup.py - test/test*.py - all pure Python modules mentioned in setup script - all files pointed by package_data (build_py) - all files defined in data_files. - all files defined as scripts. - all C sources listed as part of extensions or C libraries in the setup script (doesn't catch C headers!) Warns if (README or README.txt) or setup.py are missing; everything else is optional. t���READMEs ���README.txti����i���s,���standard file not found: should have one of s���, s���standard file '%s' not founds ���test/test*.pys ���setup.cfgt���build_pyt ���build_extt ���build_clibt ���build_scriptsN(���RX���s ���README.txt(���RI���t���script_namet ���isinstancet���tupleR;���RM���t���existsRA���R���R���t���stringt���joint���filterRN���R����t���extendt���get_finalized_commandt���has_pure_modulest���get_source_filest ���data_filest���has_data_filest���strR ���t���has_ext_modulest���has_c_librariest���has_scripts(���R���t ���standardst���fnt���altst���got_itt���optionalt���patternt���filesRY���t���pkgt���src_dirt ���build_dirt ���filenamest���filenamet���itemt���dirnameR"���RZ���R[���R\���(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyRS�������s^���� ' c���������C���s����t��j�d�|��j���t�|��j�d�d�d�d�d�d�d�d�d�d�d�d��}�zw�xp�|�j����}�|�d �k�rh�Pn��y�|��j�j�|���WqL�t�t �f�k �r��}�|��j �d �|�j�|�j�|�f���qL�XqL�WWd �|�j ����Xd �S(���s����Read and parse manifest template file named by self.template. (usually "MANIFEST.in") The parsing and processing is done by 'self.filelist', which updates itself accordingly. s���reading manifest template '%s't���strip_commentsi���t���skip_blankst ���join_linest ���lstrip_wst ���rstrip_wst ���collapse_joins���%s, line %d: %sN(���R���t���infoR,���R���t���readlineR���RA���t���process_template_lineR ���t ���ValueErrorR���Ry���t���current_linet���close(���R���R,���t���linet���msg(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyRT���,��s(���� c���������C���s����|��j��d���}�|��j�j����}�|��j�j�d�d�|�j��|��j�j�d�d�|��t�j�d�k�re�d�}�n�d�}�d�d�d�d �d �d�d�g�}�d �|�d�j �|���|�f�}�|��j�j�|�d�d��d�S(���sv��Prune off branches that might slip into the file list as created by 'read_template()', but really don't belong there: * the build tree (typically "build") * the release tree itself (only an issue if we ran "sdist" previously with --keep-temp, or it aborted) * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories t���buildt���prefixt���win32s���/|\\t���/t���RCSt���CVSs���\.svns���\.hgs���\.gits���\.bzrt���_darcss���(^|%s)(%s)(%s).*t���|t���is_regexi���N( ���Re���RI���t���get_fullnameRA���t���exclude_patternR���t ���build_baset���syst���platformRb���(���R���R����t���base_dirt���sepst���vcs_dirst���vcs_ptrn(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyRU���M��s���� c���������C���sk���|��j�����r$�t�j�d�|��j���d�S|��j�j�}�|�j�d�d���|��j�t�j �|��j�|�f�d�|��j���d�S(���s����Write the file list in 'self.filelist' (presumably as filled in by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'. s5���not writing to manually maintained manifest file '%s'Ni����s*���# file GENERATED by distutils, do NOT edits���writing manifest file '%s'( ���RO���R���R����R-���RA���Rt���t���insertt���executeR���t ���write_file(���R���t���content(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyRV���g��s���� c���������C���sS���t��j�j�|��j���s�t�St�|��j�d���}�z�|�j����}�Wd��|�j����X|�d�k�S(���Nt���rUs+���# file GENERATED by distutils, do NOT edit (���R;���RM���RN���R-���t���Falset���openR����R����(���R���t���fpt ���first_line(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyRO���v��s����c���������C���sy���t��j�d�|��j���t�|��j���}�xF�|�D]>�}�|�j����}�|�j�d���s)�|�rW�q)�n��|��j�j�|���q)�W|�j����d�S(���s����Read the manifest file (named by 'self.manifest') and use it to fill in 'self.filelist', the list of files to include in the source distribution. s���reading manifest file '%s't���#N( ���R���R����R-���R����t���stript ���startswithRA���R���R����(���R���R-���R����(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyRP������s���� c���������C���s����|��j��|���t�j�|�|�d�|��j��t�t�d���rH�d�}�d�|�}�n�d�}�d�|�}�|�sn�t�j�d���n �t�j �|���x_�|�D]W�}�t�j �j�|���s��t�j�d�|���q��t�j �j�|�|���}�|��j �|�|�d�|��q��W|��j�j�j�|���d�S( ���s���Create the directory tree that will become the source distribution archive. All directories implied by the filenames in 'files' are created under 'base_dir', and then we hard link or copy (if hard linking is unavailable) those files into place. Essentially, this duplicates the developer's source tree, but in a directory named after the distribution, containing only the files to be distributed. t���dry_runt���linkt���hards���making hard links in %s...s���copying files to %s...s)���no files to distribute -- empty manifest?s#���'%s' not a regular file -- skippingN(���t���mkpathR���t���create_treeR����t���hasattrR;���R���R���R���R����RM���RN���Rb���t ���copy_fileRI���t���metadatat���write_pkg_info(���R���R����Rt���R����R����t���filet���dest(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyt���make_release_tree���s ���� c������ ���C���s��|��j��j����}�t�j�j�|��j�|���}�|��j�|�|��j�j���g��}�d�|��j �k�r}�|��j �j �|��j �j�|��j �j�d�������n��xd�|��j �D]Y�}�|��j �|�|�d�|�d�|��j�d�|��j��}�|�j �|���|��j��j�j �d�d�|�f���q��W|�|��_�|��j�st�j�|�d�|��j��n��d�S( ���s���Create the source distribution(s). First, we create the release tree with 'make_release_tree()'; then, we create all required archive files (according to 'self.formats') from the release tree. Finally, we clean up by blowing away the release tree (unless 'self.keep_temp' is true). The list of archive files created is stored so it can be retrieved later by 'get_archive_files()'. t���tarR����R4���R5���R���t����R����N(���RI���R����R;���RM���Rb���R2���R����RA���Rt���R���R���t���popt���indext���make_archiveR4���R5���t ���dist_filesR3���R1���R���t���remove_treeR����(���R���R����t ���base_nameR3���t���fmtR����(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyRE������s���� + c���������C���s���|��j��S(���sz���Return the list of archive files created when the command was run, or None if the command hasn't run yet. (���R3���(���R���(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyt���get_archive_files���s����(���s ���template=R���s5���name of manifest template file [default: MANIFEST.in](���s ���manifest=R���s)���name of manifest file [default: MANIFEST]N(���s���use-defaultsNsR���include the default file set in the manifest [default; disable with --no-defaults](���s���no-defaultsNs"���don't include the default file set(���R ���Ns����specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune](���s���no-pruneNs$���don't automatically exclude anything(���s ���manifest-onlyR!���sE���just regenerate the manifest and then stop (implies --force-manifest)(���s���force-manifestR"���sk���forcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.(���s���formats=Ns6���formats for source distribution (comma-separated list)(���s ���dist-dir=R$���sF���directory to put the source distribution archive(s) in [default: dist](���s���metadata-checkNs[���Ensure that all required elements of meta-data are supplied. Warn if any missing. [default](���s���owner=R%���s@���Owner name used when creating a tar file [default: current user](���s���group=R&���sA���Group name used when creating a tar file [default: current group](���t���__name__t ���__module__t���descriptionR���R���t���user_optionst���boolean_optionsR���t���help_optionst���negative_optR:���t���sub_commandsR6���R@���RG���RL���RD���RS���RT���RU���RV���RO���RP���R����RE���R����(����(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyR���$���sn��� ������������� ( R ! * (���t���__doc__t���__revision__R;���Ra���R����R����t���warningsR���t���distutils.coreR���t ���distutilsR���R���R���R���t���distutils.text_fileR���t���distutils.errorsR���R ���R ���t���distutils.filelistR���R���t���distutils.utilR ���R���R���(����(����(����s/���/usr/lib64/python2.7/distutils/command/sdist.pyt���<module>���s���"