def test_cp_f_d(self):
        """Copy a file to a directory.

        """
        src = self.src
        try:
            cp(src, "/tmp")
            assert (os.path.exists(os.path.join("/tmp", basename(src))))
        finally:
            rm_silent("/tmp/test.txt")
    def test_cp_f_f(self):
        """Copy a file to another file.

        """
        src = self.src
        try:
            cp(src, "/tmp/test.txt")
            assert (os.path.exists("/tmp/test.txt"))
        finally:
            rm_silent("/tmp/test.txt")
Exemple #3
0
def package(VERSION):
    """Package the emacs-for-python distribution
    """
    clean()
    globs = MANIFEST.split()
    # Concatenating lists
    files = itertools.chain(*(glob.glob(g) for g in globs))
    mkdir("dist/emacs-for-python-"+VERSION,parent=True)
    cp(files,"dist/emacs-for-python-"+VERSION)
    archive("dist/emacs-for-python-"+VERSION, 
            "dist/emacs-for-python-%s.tar.gz"%VERSION,format="gzip")
    archive("dist/emacs-for-python-"+VERSION, 
            "dist/emacs-for-python-%s.zip"%VERSION,format="zip")
def package_command():
    """Package the emacs-for-python distribution
    """
    clean()
    GLOBS = "COPYING README.org epy-*.el extensions\
 doc python-libs scripts".split()
    
    # Concatenating lists
    FILES = itertools.chain(*(glob.glob(g) for g in GLOBS))
    mkdir("dist/emacs-for-python-"+VERSION,parent=True)
    [cp(f,"dist/emacs-for-python-"+VERSION) for f in FILES]
    archive(["dist/emacs-for-python-"+VERSION], 
            "dist/emacs-for-python-%s.tar.gz"%VERSION,format="gzip")
 def test_cp_d_d_nonexistent(self):
     try:
         cp("testdir","/tmp/testdir")
         assert_dir_structure()
     finally:
         rm_silent('/tmp/testdir')
 def test_cp_d_d(self):
     try:
         cp('testdir', '/tmp')
         assert_dir_structure()
     finally:
         rm_silent('/tmp/testdir')