# HG changeset patch # User Jeff Hammel # Date 1330124708 28800 # Node ID c41a946d34af84c9c88a262b2d0aad75dd291bc6 # Parent d63ae03cc300003c4313ead193501a69fc95f18c stub out info method diff -r d63ae03cc300 -r c41a946d34af paint/package.py --- a/paint/package.py Fri Feb 24 14:52:53 2012 -0800 +++ b/paint/package.py Fri Feb 24 15:05:08 2012 -0800 @@ -44,8 +44,8 @@ def fetch(self): """fetch from remote source to a temporary file""" - fd, filename = tmpfile.mkstemp() - resource = urllib.urlopen(self.src) + fd, filename = tempfile.mkstemp() + resource = urllib2.urlopen(self.src) os.write(fd, resource.read()) os.close(fd) return filename @@ -71,3 +71,10 @@ self._tmppath = None __del__ = cleanup + + def info(self): + path = self.path() + assert os.path.exists(os.path.join(path, 'setup.py')) + + def dependencies(self): + path = self.path() diff -r d63ae03cc300 -r c41a946d34af tests/doctest.txt --- a/tests/doctest.txt Fri Feb 24 14:52:53 2012 -0800 +++ b/tests/doctest.txt Fri Feb 24 15:05:08 2012 -0800 @@ -1,11 +1,12 @@ Test PaInt ================ -The obligatory imports: +The obligatory imports:: >>> import paint -Run some tests. This test will fail, please fix it: +Get the dependencies of a package:: >>> jetperf = paint.Package('http://k0s.org/mozilla/hg/jetperf/archive/tip.tar.gz') - + >>> dependencies = jetperf.dependencies() + >>> jetperf.cleanup()