file_get_contents
1#@!#!123s
D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
lib64
/
python2.7
/
distutils
/
Filename :
archive_util.pyo
back
Copy
� {fc�����������@���s���d��Z��d�Z�d�d�l�Z�d�d�l�m�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 �y�d�d �l�m�Z�Wn�e�k �r��d�Z�n�Xy�d�d �l�m�Z�Wn�e�k �r��d�Z�n�Xd����Z�d����Z�d �d�d�d�d�d���Z�d�d�d���Z�i�e�d�g�d�f�d�6e�d �g�d�f�d�6e�d!�g�d�f�d�6e�d"�g�d�f�d�6e�g��d�f�d�6Z�d����Z�d�d�d�d�d�d�d���Z�d�S(#���so���distutils.archive_util Utility functions for creating archive files (tarballs, zip files, that sort of thing).s���$Id$i����N(���t���warn(���t���DistutilsExecError(���t���spawn(���t���mkpath(���t���log(���t���getpwnam(���t���getgrnamc���������C���s^���t��d�k�s�|��d�k�r�d�Sy�t��|����}�Wn�t�k �rE�d�}�n�X|�d�k �rZ�|�d�Sd�S(���s"���Returns a gid, given a group name.i���N(���R���t���Nonet���KeyError(���t���namet���result(����(����s.���/usr/lib64/python2.7/distutils/archive_util.pyt���_get_gid���s���� c���������C���s^���t��d�k�s�|��d�k�r�d�Sy�t��|����}�Wn�t�k �rE�d�}�n�X|�d�k �rZ�|�d�Sd�S(���s"���Returns an uid, given a user name.i���N(���R���R���R���(���R ���R ���(����(����s.���/usr/lib64/python2.7/distutils/archive_util.pyt���_get_uid'���s���� t���gzipi����c������������s���i�d�d�6d�d�6d�d�6d�d�6}�i�d�d�6d�d�6d �d�6}�|�d�k �rg�|�|�j����k�rg�t�d ���n��|��d�} �|�d�k�r��| �|�j�|�d���7} �n��t�t�j�j�| ���d�|��d �d�l�} �t �j �d���t�������t�����������������f�d����}�|�sC| �j �| �d�|�|���}�z�|�j�|�d�|��Wd�|�j����Xn��|�d�k�r�t�d�t���| �|�|�} �t�j�d�k�r�|�| �| �g�}�n�|�d�| �g�}�t�|�d�|��| �S| �S(���s-��Create a (possibly compressed) tar file from all the files under 'base_dir'. 'compress' must be "gzip" (the default), "compress", "bzip2", or None. (compress will be deprecated in Python 3.2) 'owner' and 'group' can be used to define an owner and a group for the archive that is being built. If not provided, the current owner and group will be used. The output tar file will be named 'base_dir' + ".tar", possibly plus the appropriate compression extension (".gz", ".bz2" or ".Z"). Returns the output filename. t���gzR ���t���bz2t���bzip2t����t���compresss���.gzs���.bz2s���.ZsE���bad value for 'compress': must be None, 'gzip', 'bzip2' or 'compress's���.tart���dry_runi����Ns���Creating tar archivec������������sF������d��k �r!����|��_���|��_�n����d��k �rB���|��_���|��_�n��|��S(���N(���R���t���gidt���gnamet���uidt���uname(���t���tarinfo(���R���t���groupt���ownerR���(����s.���/usr/lib64/python2.7/distutils/archive_util.pyt���_set_uid_gid[���s���� s���w|%st���filters���'compress' will be deprecated.t���win32s���-f(���R���t���keyst ���ValueErrort���getR���t���ost���patht���dirnamet���tarfileR���t���infoR���R���t���opent���addt���closeR����t���PendingDeprecationWarningt���syst���platformR���(���t ���base_namet���base_dirR���t���verboseR���R���R���t���tar_compressiont���compress_extt���archive_nameR$���R���t���tart���compressed_namet���cmd(����(���R���R���R���R���s.���/usr/lib64/python2.7/distutils/archive_util.pyt���make_tarball3���s8����" c��� ������C���s-��y�d�d�l��}�Wn�t�k �r)�d�}�n�X|��d�}�t�t�j�j�|���d�|��|�d�k�r��|�rk�d�}�n�d�}�y �t�d�|�|�|�g�d�|��Wq)t�k �r��t�d�|���q)Xntt �j �d �|�|���|�s)|�j�|�d �d�|�j��}�|�t�j �k�r<t�j�j�t�j�j�|�d�����}�|�j�|�|���t �j �d �|���n��x��t�j�|���D]��\�} �} �}�xR�| �D]J�}�t�j�j�t�j�j�| �|�d�����}�|�j�|�|���t �j �d �|���qbWxe�|�D]]�}�t�j�j�t�j�j�| �|�����}�t�j�j�|���r�|�j�|�|���t �j �d �|���q�q�WqLW|�j����n��|�S(���sv��Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_name' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip file. i����Ns���.zipR���s���-rs���-rqt���zipsk���unable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilitys#���creating '%s' and adding '%s' to itt���wt���compressionR���s���adding '%s'(���t���zipfilet���ImportErrorR���R���R!���R"���R#���R���R���R���R%���t���ZipFilet���ZIP_DEFLATEDt���curdirt���normpatht���joint���writet���walkt���isfileR(���( ���R,���R-���R.���R���R9���t���zip_filenamet ���zipoptionsR6���R"���t���dirpatht���dirnamest ���filenamesR ���(����(����s.���/usr/lib64/python2.7/distutils/archive_util.pyt���make_zipfiley���sL���� ! $ ! R���s���gzip'ed tar-filet���gztarR���s���bzip2'ed tar-filet���bztars���compressed tar filet���ztars���uncompressed tar fileR2���s���ZIP fileR6���c���������C���s%���x�|��D]�}�|�t��k�r�|�Sq�Wd�S(���sq���Returns the first format from the 'format' list that is unknown. If all formats are known, returns None N(���t���ARCHIVE_FORMATSR���(���t���formatst���format(����(����s.���/usr/lib64/python2.7/distutils/archive_util.pyt���check_archive_formats����s���� c���������C���sC��t��j����}�|�d �k �rS�t�j�d�|���t��j�j�|����}��|�sS�t��j�|���qS�n��|�d �k�rk�t��j�}�n��i�|�d�6} �y�t �|�} �Wn�t �k �r��t�d�|���n�X| �d�}�x"�| �d�D]�\�}�} �| �| �|�<q��W|�d�k�r��|�| �d�<|�| �d�<n��z�|�|��|�| ���}�Wd �|�d �k �r>t�j�d �|���t��j�|���n��X|�S(���s���Create an archive file (eg. zip or tar). 'base_name' is the name of the file to create, minus any format-specific extension; 'format' is the archive format: one of "zip", "tar", "ztar", or "gztar". 'root_dir' is a directory that will be the root directory of the archive; ie. we typically chdir into 'root_dir' before creating the archive. 'base_dir' is the directory where we start archiving from; ie. 'base_dir' will be the common prefix of all files and directories in the archive. 'root_dir' and 'base_dir' both default to the current directory. Returns the name of the archive file. 'owner' and 'group' are used when creating a tar archive. By default, uses the current owner and group. s���changing into '%s'R���s���unknown archive format '%s'i����i���R6���R���R���Ns���changing back to '%s'(���R!���t���getcwdR���R���t���debugR"���t���abspatht���chdirR=���RL���R���R���(���R,���RN���t���root_dirR-���R.���R���R���R���t���save_cwdt���kwargst���format_infot���funct���argt���valt���filename(����(����s.���/usr/lib64/python2.7/distutils/archive_util.pyt���make_archive����s2���� (���R���R ���(���R���R���(���R���R���(���R���N(���t���__doc__t���__revision__R!���t���warningsR����R*���t���distutils.errorsR���t���distutils.spawnR���t���distutils.dir_utilR���t ���distutilsR���t���pwdR���R:���R���t���grpR���R���R���R5���RH���RL���RO���R\���(����(����(����s.���/usr/lib64/python2.7/distutils/archive_util.pyt���<module>���s<��� E>