# HG changeset patch # User Jeff Hammel # Date 1330037796 28800 # Node ID 5b74792d46e42b64a10e6de78cc428421bb88ca4 # Parent e230ac76aaa4d0fd14e4364c28b822a7c2883e23 stub package model; diff -r e230ac76aaa4 -r 5b74792d46e4 paint/package.py --- a/paint/package.py Thu Feb 23 13:26:06 2012 -0800 +++ b/paint/package.py Thu Feb 23 14:56:36 2012 -0800 @@ -2,7 +2,24 @@ package model for python PAckage INTrospection """ +import tempfile + class Package(object): def __init__(self, src): self.src = src + self._tmppath = None + + def path(self): + """filesystem path to package""" + if utils.isURL(self.src): + if self._tmppath: + return self._tmppath + self.fetch() + return self._tmppath + return self.src + + def fetch(self): + """fetch from remote source""" + self._tmppath = tempfile.mkdtemp() + raise NotImplementedError