Opened 3 years ago

#8869 defect new

bin/admin/build-apidocs does not account for Twisted sources having been moved to a src/ subdir

Reported by: tera-torn Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:


So the script usage string could be changed to ask for the directory containing the twisted package dir (i.e. src/) instead of the checkout directory. Or it can assumed there is a src/ directory and account for that when calculating paths.

% bin/admin/build-apidocs
Must specify two arguments: Twisted checkout and destination path
% bin/admin/build-apidocs . /tmp
Traceback (most recent call last):
  File "bin/admin/build-apidocs", line 20, in <module>
  File "/usr/lib/python2.7/dist-packages/twisted/python/", line 1275, in main
    self.buildAPIDocs(FilePath(args[0]), FilePath(args[1]))
  File "/usr/lib/python2.7/dist-packages/twisted/python/", line 1250, in buildAPIDocs
    version = Project(projectRoot.child("twisted")).getVersion()
  File "/usr/lib/python2.7/dist-packages/twisted/python/", line 428, in getVersion
    execfile(directory.child("").path, namespace)
  File "/usr/lib/python2.7/dist-packages/twisted/python/", line 190, in execfile
    fin = open(filename, "rbU")
IOError: [Errno 2] No such file or directory: '/home/teratorn/code/twisted/twisted/'

The script *seems* to work if you just tell it to use the src/ dir, but I haven't actually let it run all the way to completion (takes forever) to verify the results.

Clearly there *should* be some kind of integration test that checks that the build-apidocs script actually works, but that could be hard to both make it accurate/useful and run fast enough to be included in the normal test suite...

Change History (0)

Note: See TracTickets for help on using tickets.