Commits

Crispin Wellington  committed cd980fd

some documentation

  • Participants
  • Parent commits 3fad916
  • Branches develop

Comments (0)

Files changed (2)

File parcel/deploy/deploy.py

     postinst_lines = []
     
     def __init__(self, app_name, build_deps=None, run_deps=None, path=".", 
-				 base=None, arch=distro.Debian(), version=None, venv_dirname=default_virtual):
+		 base=None, arch=distro.Debian(), version=None, venv_dirname=default_virtual):
         """Initialise the Deploy object. 
         WARNING: This is not your usual contructor. Constructing this object makes an immediate fabric connection to the
         remote host to fetch information and update. Be aware of this. This is probably bad.
         self.path = os.path.realpath(path)
 
         #: Location of files during build on build host. Default is user's home directory.
-        #: If path is relative, it's relative to the remote user's home directory. If the path is absolute,
-        #: it's used as is.
+        #: If path is relative, it's relative to the remote user's home directory. 
+        #: If the path is absolute, it's used as is.
         self.base_path = os.path.join(remotehome,self.build_dir)
 
         self.pkg_name = app_name.lower()

File parcel/distro.py

 #
 
 class Distro(object):
+    """The base class for Distro classes. If use_sudo is true, then super user commands
+    will be run using fabric's sudo call. If sudo is false, super user access is gained by
+    getting fabric to connect as root user."""
+
     space = '.parcel-build-temp'
     pip_download_cache = '/tmp/pip-download-cache/'
 
     def __init__(self, use_sudo=False):
+        """Construct a Distro instance. If use_sudo is true, then super user commands
+        will be run using fabric's sudo call. If sudo is false, super user access is gained by
+        getting fabric to connect as root user."""
         self.use_sudo = use_sudo
 
     def mkdir(self, remote):
+        """Make a directory on the remote"""
         return run('mkdir -p "%s" && cd "%s" && pwd'%(remote,remote))
 
     def su(self, *args, **kwargs):
+        """Method to perform a remote task as a super user. Takes same arguments as fabric.api.run        or fabric.api.sudo. Can be overridden to provide your own super user execution hook."""
         if self.use_sudo:
             return sudo(*args, **kwargs)
 
         raise NotImplementedError
 	
     def push_files(self,pathlist,dst):
+        """Push all the files in pathlist into dst directory on remote."""
         for path in pathlist:
             put(path, os.path.join(dst,os.path.basename(path)))