Skip to content

Commit

Permalink
Merge pull request #177 from guewen/fix-docs
Browse files Browse the repository at this point in the history
Adjust docs build to use 'dependencies' path
  • Loading branch information
gurneyalex committed Dec 4, 2015
2 parents f458d07 + 8b450d6 commit 1f58d50
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions magentoerpconnect/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,16 @@
if os.environ.get('TRAVIS_BUILD_DIR') and os.environ.get('VERSION'):
# build from travis
repos_home = os.environ['HOME']
deps_path = os.path.join(repos_home, 'dependencies')
odoo_folder = 'odoo-8.0'
odoo_root = os.path.join(repos_home, odoo_folder)
build_path = os.environ['TRAVIS_BUILD_DIR']
else:
# build from a buildout
odoo_root = os.path.abspath('../../../odoo')
repos_home = os.path.abspath('../../..')
deps_path = os.path.abspath('../../..')
build_path = os.path.abspath('../..')

repos = [repo for repo in os.listdir(repos_home)
if os.path.isdir(os.path.join(repos_home, repo))
and not repo.startswith('.')]

addons_paths = []


Expand All @@ -46,13 +43,12 @@ def add_path(*paths):
add_path(odoo_root, 'addons')
add_path(build_path)

# filter addons-paths which are not dependencies (we have other
# directories such as "builds" on travis)
with open('../../oca_dependencies.txt', 'r') as depfile:
dependencies = depfile.read().split()
for repo in repos:
if repo in dependencies:
add_path(repos_home, repo)
deps_repos = [repo for repo in os.listdir(deps_path)
if os.path.isdir(os.path.join(deps_path, repo))
and not repo.startswith('.')]

for repo in deps_repos:
add_path(deps_path, repo)

addons = [x for x in os.listdir(build_path)
if not x.startswith(('.', '__')) and
Expand Down

0 comments on commit 1f58d50

Please sign in to comment.