[POC] discard dev doc if odoo directory is not found

This commit is contained in:
Victor Feyens 2020-09-28 16:52:33 +02:00
parent 610f2abef3
commit 53389b1992

12
conf.py
View File

@ -9,8 +9,11 @@ sys.path.insert(0,
os.path.abspath( os.path.abspath(
os.path.join(DIR, '_extensions'))) os.path.join(DIR, '_extensions')))
# put current odoo's source on PYTHONPATH for autodoc build_dev_doc = False
sys.path.insert(0, os.path.abspath(os.path.join(DIR, '../odoo'))) if os.path.exists('../odoo/odoo-bin'):
build_dev_doc = True
# put current odoo's source on PYTHONPATH for autodoc
sys.path.insert(0, os.path.abspath(os.path.join(DIR, '../odoo')))
# -- General configuration ------------------------------------------------ # -- General configuration ------------------------------------------------
@ -72,12 +75,15 @@ today_fmt = '%B %d, %Y'
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
exclude_patterns = [ exclude_patterns = [
# translations # translations
'locale', 'user/locale',
'README.*', 'README.*',
# virtualenv # virtualenv
'bin', 'include', 'lib', 'bin', 'include', 'lib',
] ]
if not build_dev_doc:
exclude_patterns += ["developer"]
# The specifications of redirect rules used by the redirects extension. # The specifications of redirect rules used by the redirects extension.
redirects_file = 'redirects.txt' redirects_file = 'redirects.txt'