Georg Brandl avatar Georg Brandl committed d81796c

Closes #98: mention original copyright owners, and port fix from https://bitbucket.org/thomaswaldmann/sphinx-autopackage-script/changeset/dba2b779c1af.

Comments (0)

Files changed (1)

     ReST files appropriately to create code documentation with Sphinx.  It also
     creates a modules index (named modules.<suffix>).
 
-    :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
+    This is derived from the "sphinx-autopackage" script, which is:
+    Copyright 2008 Société des arts technologiques (SAT), http://www.sat.qc.ca/.
+
+    :copyright: 2007-2011 by the Sphinx team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 import os
     Look for every file in the directory tree and create the corresponding
     ReST files.
     """
+    # use absolute path for root, as relative paths like '../../foo' cause
+    # 'if "/." in root ...' to filter out *all* modules otherwise
+    rootpath = os.path.abspath(rootpath)
     # check if the base directory is a package and get is name
     if INITPY in os.listdir(rootpath):
-        package_name = path.abspath(rootpath).split(path.sep)[-1]
+        package_name = rootpath.split(path.sep)[-1]
     else:
         package_name = None
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.