changeset 71:da69d58f960d

stub method of conversion, PackageSet, and some cleanup
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 27 Jan 2013 17:57:38 -0800
parents 81142931ebbd
children 017b75cd61d8
files README.txt paint/info.py paint/package.py
diffstat 3 files changed, 38 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/README.txt	Sat Jan 26 00:10:53 2013 -0800
+++ b/README.txt	Sun Jan 27 17:57:38 2013 -0800
@@ -21,6 +21,12 @@
 
 - pkg_resources : http://packages.python.org/distribute/pkg_resources.html
 
+
+Resources
+---------
+
+- 
+
 ----
 
 Jeff Hammel
--- a/paint/info.py	Sat Jan 26 00:10:53 2013 -0800
+++ b/paint/info.py	Sun Jan 27 17:57:38 2013 -0800
@@ -7,6 +7,7 @@
 import subprocess
 import sys
 
+from distutils.dist import DistributionMetadata
 from subprocess import check_call as call
 
 # TODO:
@@ -25,6 +26,15 @@
 
 # TODO: consider using pkginfo
 
+def setup2metadata(**kwargs):
+    """
+    convert setup arguments to standard python metadata:
+    http://www.python.org/dev/peps/pep-0314/
+    """
+    metadata = DistributionMetadata()
+    raise NotImplementedError("TODO")
+
+
 class PackageInfo(object):
     """abstract base class of package info"""
     def __init__(self, path):
--- a/paint/package.py	Sat Jan 26 00:10:53 2013 -0800
+++ b/paint/package.py	Sun Jan 27 17:57:38 2013 -0800
@@ -242,17 +242,35 @@
         returns subpath 2-tuple appropriate for pypi path structure:
         http://k0s.org/portfolio/pypi.html
         """
-        print ">>> pypi_path:Getting info"
+        self._log(">>> pypi_path:Getting info")
         info = self.info()
-        print ">>> pypi_path:DONE getting info"
+        self._log(">>> pypi_path:DONE getting info")
 
         # determine the extension
-        print ">>> pypi_path:Getting extension"
+        self._log(">>> pypi_path:Getting extension")
         extension = self.extension()
-        print ">>> pypi_path:DONE Getting extension: %s" % extension
+        self._log(">>> pypi_path:DONE Getting extension: %s" % extension)
 
         # get the filename destination
         name = info['Name']
         version = info['Version']
         filename = '%s-%s%s' % (name, version, extension)
         return name, filename
+
+
+class PackageSet(object):
+    """
+    a group of packages
+    """
+
+    def __init__(self, *packages):
+        for package in packages:
+            # if Package instance, add that, otherwise convert
+            pass
+        raise NotImplementedError
+
+    def dependencies(self):
+        """return dependecies for each package"""
+
+    def unroll_dependencies(self):
+        """unroll dependencies for a package set"""