# HG changeset patch # User Jeff Hammel # Date 1359338258 28800 # Node ID da69d58f960d4dcbd45fcafa64c65a02472917be # Parent 81142931ebbd06c87e340ae4d5b475be3c64d1b2 stub method of conversion, PackageSet, and some cleanup diff -r 81142931ebbd -r da69d58f960d README.txt --- 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 diff -r 81142931ebbd -r da69d58f960d paint/info.py --- 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): diff -r 81142931ebbd -r da69d58f960d paint/package.py --- 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"""