Skip to content

Commit

Permalink
py3k: Handle new naming of extension libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
QuLogic committed Sep 18, 2015
1 parent 4ae1d06 commit 1a02980
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/iris/src/sphinxext/generate_package_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ def do_package(package_name):
not (ext in ['.py', '.so'])):
continue

# Handle new shared library naming conventions
if ext == '.so':
name = name.split('.', 1)[0]

rel_path = root_package + \
os.path.join(root, fname).split(rootdir)[-1]
mod_folder = root_package + \
Expand Down Expand Up @@ -251,7 +255,7 @@ def do_package(package_name):
paths.append(os.path.join(*split_path) + '.rst')

paths.extend(os.path.join(os.path.basename(os.path.dirname(path)),
os.path.splitext(os.path.basename(path))[0])
os.path.basename(path).split('.', 1)[0])
for imp_name, path in module_folders.get(package, []))

paths.sort()
Expand Down

0 comments on commit 1a02980

Please sign in to comment.