diff --git a/as/recipe/frozenpkg/frozen.py b/as/recipe/frozenpkg/frozen.py index c21f337..ce6f77d 100644 --- a/as/recipe/frozenpkg/frozen.py +++ b/as/recipe/frozenpkg/frozen.py @@ -62,7 +62,7 @@ def _create_venv(self, root_dir): root_dir, ] - logger.debug('Launching "%s"' % (" ".join(virtualenv))) + logger.info('Creating virtualenv by launching "%s".' % (" ".join(virtualenv))) job = subprocess.Popen(virtualenv, stdout = subprocess.PIPE, stderr = subprocess.STDOUT) @@ -94,6 +94,7 @@ def _copy_eggs (self, root_dir): [self.buildout['buildout']['develop-eggs-directory'], self.buildout['buildout']['eggs-directory']] ) + logger.info('Installing eggs in virtualenv.') for dist in ws: if any([re.match(pattern, dist.location) for pattern in SKIP_EGGS]): ## skip the eggs in SKIP_EGGS @@ -134,6 +135,7 @@ def _copy_outputs(self, root_dir): Copies the outputs from parts :param root_dir: the root directory where to copy things """ + logger.info('Copying outputs.') buildout_dir = self.buildout['buildout']['directory'] for part in self.buildout['buildout']['parts'].split(): try: @@ -142,7 +144,7 @@ def _copy_outputs(self, root_dir): rel_dir = os.path.relpath(output, buildout_dir) dest_dir = os.path.join(root_dir, os.path.dirname(rel_dir)) - logger.debug('Copying %s -> %s' % (rel_dir, dest_dir)) + logger.debug('... "%s" -> "%s"' % (rel_dir, dest_dir)) if not os.path.exists(dest_dir): os.makedirs(dest_dir) shutil.copy2(output, dest_dir) @@ -169,6 +171,7 @@ def _copy_extra_files (self, root_dir, install_prefix): for r in self.options.get('extra-copies', self.name).split('\n') if r.strip()] + logger.info('Copying extras.') for copy_line in extra_copies: try: src, dest = [b.strip() for b in copy_line.split("->")] @@ -181,7 +184,7 @@ def _copy_extra_files (self, root_dir, install_prefix): full_path_dest = os.path.normpath(os.path.join(buildroot, dest)) for src_el in glob.glob(src): - logger.debug('Copying %s' % src_el) + logger.debug('... copying "%s".' % src_el) try: if os.path.isdir(src_el): shutil.copytree(src_el, full_path_dest) @@ -189,13 +192,13 @@ def _copy_extra_files (self, root_dir, install_prefix): # maybe the destination is a directory: then we have to # create it at the target too... if dest.endswith('/') and not os.path.exists(full_path_dest): - logger.debug('... creating %s directory' % dest) + logger.debug('... creating "%s" directory.' % dest) os.makedirs(full_path_dest) shutil.copy(src_el, full_path_dest) except Exception, e: - logger.debug('ERROR: when copying %s to %s' % (src_el, full_path_dest)) + logger.debug('ERROR: when copying "%s" to "%s"' % (src_el, full_path_dest)) return pythonpath @@ -211,7 +214,7 @@ def _prepare_venv(self, root_dir): root_dir, ] - logger.debug('Launching "%s"' % (" ".join(virtualenv))) + logger.info('Making virtualenv relocatable with "%s".' % (" ".join(virtualenv))) job = subprocess.Popen(virtualenv, stdout = subprocess.PIPE, stderr = subprocess.STDOUT) @@ -222,7 +225,7 @@ def _prepare_venv(self, root_dir): sys.exit(1) local_dir = os.path.join(root_dir, "local") - logger.debug('Removing"%s"' % local_dir) + logger.debug('Removing "%s".' % local_dir) shutil.rmtree(local_dir) @@ -230,6 +233,7 @@ def _create_tar (self, root_dir, filename, compress = False): """ Create a tar file from the virtualenv """ + logger.info('Creating tar file.') import tarfile with tarfile.open(filename, 'w' if not compress else 'w:gz', dereference = True) as t: for name in glob.glob(os.path.join(root_dir, '*')): diff --git a/as/recipe/frozenpkg/frozenrpm.py b/as/recipe/frozenpkg/frozenrpm.py index d955e56..c9a6ea4 100644 --- a/as/recipe/frozenpkg/frozenrpm.py +++ b/as/recipe/frozenpkg/frozenrpm.py @@ -173,7 +173,6 @@ def install (self): tar_filename = os.path.join(top_rpmbuild_dir, "SOURCES", pkg_name + ".tar") tar_filename = self._create_tar(buildroot_topdir, tar_filename) - # launch rpmbuild command = [ "rpmbuild", @@ -183,12 +182,12 @@ def install (self): "-ta", tar_filename, ] - logger.debug('Launching "%s"' % ' '.join(command)) + logger.info('Launching "%s".' % ' '.join(command)) job = subprocess.Popen(command, stdout = subprocess.PIPE, stderr = subprocess.STDOUT) stdout, _ = job.communicate() if job.returncode != 0: - logger.critical('could not build the RPM') + logger.critical('could not build the RPM.') print stdout return [] diff --git a/setup.py b/setup.py index a0a9875..4884a64 100755 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ import os -__VERSION__ = '0.2.17' +__VERSION__ = '0.2.18' #def read(*rnames):