diff paint/package.py @ 48:abfb267e8332

debugging info; lord i hate this
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 08 May 2012 10:45:16 -0700
parents 213cf933366d
children 85374a69cf89
line wrap: on
line diff
--- a/paint/package.py	Mon Apr 02 14:27:53 2012 -0700
+++ b/paint/package.py	Tue May 08 10:45:16 2012 -0700
@@ -42,6 +42,8 @@
     def _path(self):
         """filesystem path to package directory"""
 
+        print ">>> Getting path to package"
+
         # return cached copy if it exists
         if self._tmppath:
             return self._tmppath
@@ -178,6 +180,8 @@
         """return info dictionary for package"""
         # could use pkginfo module
 
+        print ">>> Getting the info"""
+
         pkg_info = self._pkg_info()
 
         # read the package information
@@ -190,6 +194,7 @@
             info_dict[key] = value
 
         # return the information
+        print ">>> Info: %s" % info_dict
         return info_dict
 
     def dependencies(self):
@@ -287,16 +292,22 @@
         tempdir = tempfile.mkdtemp()
         try:
             self.download(tempdir)
-            for f in os.listdir(tempdir):
+            files = os.listdir(tempdir)
+            print ">>> Files: %s" % files
+            for f in files:
 
                 # full path
                 src = os.path.join(tempdir, f)
 
                 # make a package of the thing
+                print ">>> pypi:Packaging %s" % src
                 package = Package(src)
+                print ">>> pypi:DONE packaging %s" % src
 
                 # get destination dirname, filename
+                print ">>> pypi:Getting PyPI path"
                 dirname, filename = package.pypi_path()
+                print ">>> pypi:DONE PyPI path: %s/%s" % (dirname, filename)
 
                 # make the directory if it doesn't exist
                 subdir = os.path.join(directory, dirname)
@@ -305,7 +316,9 @@
                 assert os.path.isdir(subdir)
 
                 # move the file
+                print ">>> pypi:Moving to PyPI path %s/%s" % (subdir, filename)
                 package.package(destination=os.path.join(subdir, filename))
+                print ">>> Done with %s" % src
         finally:
             shutil.rmtree(tempdir)
 
@@ -314,10 +327,14 @@
         returns subpath 2-tuple appropriate for pypi path structure:
         http://k0s.org/portfolio/pypi.html
         """
+        print ">>> pypi_path:Getting info"
         info = self.info()
+        print ">>> pypi_path:DONE getting info"
 
         # determine the extension
+        print ">>> pypi_path:Getting extension"
         extension = self.extension()
+        print ">>> pypi_path:DONE Getting extension: %s" % extension
 
         # get the filename destination
         name = info['Name']