Mercurial > hg > PaInt
diff paint/info.py @ 73:5b10f2c03cb9
more stubbing of something really stupid that is really hard
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sun, 27 Jan 2013 18:19:14 -0800 |
parents | da69d58f960d |
children | 84890934af1f |
line wrap: on
line diff
--- a/paint/info.py Sun Jan 27 18:01:04 2013 -0800 +++ b/paint/info.py Sun Jan 27 18:19:14 2013 -0800 @@ -2,13 +2,16 @@ interfaces to get information from a package """ + import imp import os import subprocess import sys +from distutils.dist import Distribution from distutils.dist import DistributionMetadata from subprocess import check_call as call +from StringIO import StringIO # TODO: # Reconcile the difference between the keys (and values) between the different @@ -26,12 +29,14 @@ # TODO: consider using pkginfo -def setup2metadata(**kwargs): +def setup2metadata(**attrs): """ convert setup arguments to standard python metadata: http://www.python.org/dev/peps/pep-0314/ """ - metadata = DistributionMetadata() + distribution = Distribution(kwargs) + buffer = StringIO() + distribution.metadata.write_pkg_file(buffer) raise NotImplementedError("TODO") @@ -49,7 +54,6 @@ def __call__(self): """returns dictionary of package info""" raise NotImplementedError("abstract base class") - def dependencies(self): raise NotImplementedError("abstract base class")