Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
src/sage_docbuild/builders.py: Handle namespace packages
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Jun 8, 2022
1 parent 1326e17 commit 5aebcf3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sage_docbuild/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,10 @@ def get_new_and_updated_modules(self):
raise

module_filename = sys.modules[module_name].__file__
if module_filename is None:
# Namespace package
old_modules.append(module_name)
continue
if (module_filename.endswith('.pyc') or module_filename.endswith('.pyo')):
source_filename = module_filename[:-1]
if (os.path.exists(source_filename)):
Expand Down

0 comments on commit 5aebcf3

Please sign in to comment.