Lines Matching full:url
28 def isGitURL(self, url): argument
29 parsed = urlparse_local.urlparse(url)
32 elif os.path.isdir(url) and self.isDirectoryGitRepo(url):
40 for url in urls:
41 parsed = urlparse_local.urlparse(url)
42 if self.isGitURL(url):
43 self.git_urls.append(self.removePrefix(url,'git://'))
45 self.hg_urls.append(self.removePrefix(url,'hg://'))
46 elif parsed[0] == 'dir' or os.path.isdir(url):
47 self.dir_urls.append(self.removePrefix(url,'dir://'))
49 self.link_urls.append(self.removePrefix(url,'link://'))
51 self.tarball_urls.extend([url])
73 def getDownloadFailureMessage(package, url, filename=None): argument
77 * If URL specified manually - perhaps there is a typo?
81 * or you can download the above URL manually, to /yourselectedlocation%s
84 ''' % (package.upper(), url, slashFilename, package, slashFilename)
87 def removePrefix(url,prefix): argument
89 if url.startswith(prefix):
90 return url[len(prefix):]
91 return url
95 for url in self.git_urls:
96 yield('git',url)
100 for url in self.hg_urls:
101 yield('hg',url)
104 for url in self.dir_urls:
105 yield('dir',url)
106 for url in self.link_urls:
107 yield('link',url)
108 for url in self.tarball_urls:
109 yield('tarball',url)
111 def genericRetrieve(self,proto,url,root): argument
112 …'''Fetch package from version control repository or tarfile indicated by URL and extract it into r…
114 return self.gitRetrieve(url,root)
116 return self.hgRetrieve(url,root)
118 return self.dirRetrieve(url,root)
120 self.linkRetrieve(url,root)
122 self.tarballRetrieve(url,root)
124 def dirRetrieve(self, url, root): argument
125 self.logPrint('Retrieving %s as directory' % url, 3, 'install')
126 if not os.path.isdir(url): raise RuntimeError('URL %s is not a directory' % url)
128 t = os.path.join(root,os.path.basename(url))
130 shutil.copytree(url,t)
132 def linkRetrieve(self, url, root): argument
133 self.logPrint('Retrieving %s as link' % url, 3, 'install')
134 if not os.path.isdir(url): raise RuntimeError('URL %s is not pointing to a directory' % url)
136 t = os.path.join(root,os.path.basename(url))
138 os.symlink(os.path.abspath(url),t)
140 def gitRetrieve(self, url, root): argument
141 self.logPrint('Retrieving %s as git repo' % url, 3, 'install')
144 if os.path.isdir(url) and not self.isDirectoryGitRepo(url):
145 raise RuntimeError('URL %s is a directory but not a git repository' % url)
154 …cuteShellCommand('%s clone %s %s %s' % (self.sourceControl.git, submodopt, url, newgitrepo), log =…
157 failureMessage = self.getDownloadFailureMessage(self.packagename, url)
160 def hgRetrieve(self, url, root): argument
161 self.logPrint('Retrieving %s as hg repo' % url, 3, 'install')
168 …config.base.Configure.executeShellCommand('%s clone %s %s' % (self.sourceControl.hg, url, newgitre…
171 failureMessage = self.getDownloadFailureMessage(self.packagename, url)
174 def tarballRetrieve(self, url, root): argument
175 parsed = urlparse_local.urlparse(url)
178 self.logPrint('Retrieving %s as tarball to %s' % (url,localFile) , 3, 'install')
181 raise RuntimeError('Unknown compression type in URL: '+ url)
186 url = parsed[2]
187 if os.path.exists(url):
188 if not os.path.isfile(url):
189 raise RuntimeError('Local path exists but is not a regular file: '+ url)
191 shutil.copyfile(url, localFile)
198 req = Request(url)
205 failureMessage = self.getDownloadFailureMessage(self.packagename, url, filename)
220 * or you can download the above URL manually, to /yourselectedlocation/%s
223 ''' % (self.packagename.upper(), url, filename, self.packagename, filename)