call site 3 for path.local.relto
apigen/testing/test_apigen_example.py - line 237
235
236
237
238
239
240
241
   def test_source_links(self):
       self.apb.build_class_pages(['main.SomeSubClass', 'main.SomeClass'])
->     self.spb.build_pages(self.fs_root)
       self.linker.replace_dirpath(self.base, False)
       funchtml = self.base.join('api/main.SomeClass.html').read()
       assert funchtml.find('href="../source/pkg/someclass.py.html"') > -1
       _checkhtml(funchtml)
apigen/htmlgen.py - line 305
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
   def build_pages(self, base):
       for fspath in [base] + list(base.visit()):
           if fspath.ext in ['.pyc', '.pyo']:
               continue
           if self.capture:
               self.capture.err.writeorg('.')
           relfspath = fspath.relto(base)
           if relfspath.find('%s.' % (os.path.sep,)) > -1:
               # skip hidden dirs and files
               continue
           elif fspath.check(dir=True):
               if relfspath != '':
                   relfspath += os.path.sep
               reloutputpath = 'source%s%sindex.html' % (os.path.sep,
                                                         relfspath)
           else:
               reloutputpath = "source%s%s.html" % (os.path.sep, relfspath)
           reloutputpath = reloutputpath.replace(os.path.sep, '/')
           outputpath = self.base.join(reloutputpath)
           self.linker.set_link(str(fspath), reloutputpath)
->         self.build_page(fspath, outputpath, base)
apigen/htmlgen.py - line 331
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
   def build_page(self, fspath, outputpath, base):
       """ build syntax-colored source views """
       if fspath.check(ext='.py'):
           try:
               tag, nav = self.build_python_page(fspath)
           except (KeyboardInterrupt, SystemError):
               raise
           except: # XXX strange stuff going wrong at times... need to fix
               raise
               exc, e, tb = py.std.sys.exc_info()
               print '%s - %s' % (exc, e)
               print
               print ''.join(py.std.traceback.format_tb(tb))
               print '-' * 79
               del tb
               tag, nav = self.build_nonpython_page(fspath)
       elif fspath.check(dir=True):
           tag, nav = self.build_dir_page(fspath)
       else:
           tag, nav = self.build_nonpython_page(fspath)
       title = 'sources for %s' % (fspath.basename,)
       rev = self.get_revision(fspath)
       if rev:
           title += ' [rev. %s]' % (rev,)
->     reltargetpath = outputpath.relto(self.base).replace(os.path.sep,
                                                           '/')
       self.write_page(title, reltargetpath, tag, nav)