Revision 2bd23362 docs/conf.py

b/docs/conf.py
54 54
from sys import path, stderr
55 55
import os
56 56

  
57

  
58
SITE_PACKAGES_PATH = os.path.expanduser(
59
    '~/src/kamaki/docsenv/lib/python2.7/site-packages')
60

  
57 61
try:
58 62
    from objpool.http import PooledHTTPConnection
59 63
    PooledHTTPConnection
60 64
except ImportError:
61
    stderr.write("`objpool` package is required to build kamaki docs.\n")
65
    path.insert(0, SITE_PACKAGES_PATH)
66
    try:
67
        from objpool.http import PooledHTTPConnection
68
        PooledHTTPConnection
69
    except ImportError:
70
        stderr.write("`objpool` package is required to build kamaki docs.\n")
71
        exit(1)
62 72

  
63 73
try:
64 74
    from progress.bar import ShadyBar
65 75
    ShadyBar
66 76
except ImportError:
67
    stderr.write("`progress` package is required to build kamaki docs.\n")
77
    path.insert(0, SITE_PACKAGES_PATH)
78
    try:
79
        from progress.bar import ShadyBar
80
        ShadyBar
81
    except ImportError:
82
        stderr.write("`progress` package is required to build kamaki docs.\n")
83
        exit(1)
68 84

  
69 85
path.insert(0, os.path.join(os.path.abspath(os.path.dirname(__file__)), '..'))
70 86

  

Also available in: Unified diff