Current Path : /usr/local/lib/python2.5/distutils/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/local/lib/python2.5/distutils/archive_util.pyc |
³ò h”Rc @ s d Z d Z d d k Z d d k l Z d d k l Z d d k l Z d d k l Z d d d d „ Z d d d „ Z h e d g d f d <e d g d f d <e d g d f d <e d g d f d <e g d f d <Z d „ Z 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).s8 $Id: archive_util.py 37828 2004-11-10 22:23:15Z loewis $iÿÿÿÿN( t DistutilsExecError( t spawn( t mkpath( t logt gzipi c C s h d d <d d <d d <} h d g d <d g d <d g d <} | d j o | | i ƒ j o t d ‚ n | d } t t i i | ƒ d | ƒd d | | g } t | d | ƒ| o2 t | g | | | g d | ƒ| | | Sn | Sd 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. Both "tar" and the compression utility named by 'compress' must be on the default program search path, so this is probably Unix-specific. The output tar file will be named 'base_dir' + ".tar", possibly plus the appropriate compression extension (".gz", ".bz2" or ".Z"). Return the output filename. s .gzR s .bz2t bzip2s .Zt compresss -f9s -fs= bad value for 'compress': must be None, 'gzip', or 'compress's .tart dry_runt tars -cfN( t Nonet keyst ValueErrorR t ost patht dirnameR ( t base_namet base_dirR t verboseR t compress_extt compress_flagst archive_namet cmd( ( s2 /usr/local/lib/python2.5/distutils/archive_util.pyt make_tarball s$ c C s# y d d k } Wn t j o d } n X| d } t t i i | ƒ d | ƒ| d j o^ | o d } n d } y t d | | | g d | ƒWqt j o t d | ‚ qXnc t i d | | ƒ d „ } | p? | i | d d | i ƒ} t i i | | | ƒ | i ƒ n | S( sq Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".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 itc S sn xg | D]_ } t i i t i i | | ƒ ƒ } t i i | ƒ o% | i | | ƒ t i d | ƒ q q Wd S( Ns adding '%s'( R R t normpatht joint isfilet writeR t info( t zR t namest nameR ( ( s2 /usr/local/lib/python2.5/distutils/archive_util.pyt visitb s !t wt compression( t zipfilet ImportErrorR R R R R R R R R t ZipFilet ZIP_DEFLATEDt walkt close( R R R R R# t zip_filenamet zipoptionsR R ( ( s2 /usr/local/lib/python2.5/distutils/archive_util.pyt make_zipfile<