comparison paint/package.py @ 15:8c8b7482772f

fix a few failures but still failing
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 24 Feb 2012 15:53:26 -0800
parents 6d27c2136163
children e6cdc58fc4f5
comparison
equal deleted inserted replaced
14:6d27c2136163 15:8c8b7482772f
45 45
46 return self.src 46 return self.src
47 47
48 def fetch(self): 48 def fetch(self):
49 """fetch from remote source to a temporary file""" 49 """fetch from remote source to a temporary file"""
50 resource = urllib2.urlopen(self.src)
50 fd, filename = tempfile.mkstemp() 51 fd, filename = tempfile.mkstemp()
51 resource = urllib2.urlopen(self.src)
52 os.write(fd, resource.read()) 52 os.write(fd, resource.read())
53 os.close(fd) 53 os.close(fd)
54 return filename 54 return filename
55 55
56 def unpack(self, archive): 56 def unpack(self, archive):
83 if self._egg_info: 83 if self._egg_info:
84 # return cached copy 84 # return cached copy
85 return self._egg_info 85 return self._egg_info
86 86
87 directory = self.path() 87 directory = self.path()
88 assert os.path.exists(os.path.join(path, 'setup.py')) 88 assert os.path.exists(os.path.join(directory, 'setup.py'))
89 89
90 # setup the egg info 90 # setup the egg info
91 call([sys.executable, 'setup.py', 'egg_info'], cwd=directory, stdout=PIPE) 91 call([sys.executable, 'setup.py', 'egg_info'], cwd=directory, stdout=PIPE)
92 92
93 # get the .egg-info directory 93 # get the .egg-info directory