Skip to content

Commit

Permalink
pants doc gen: fix up relative paths that assumed "twitter/pants" (vs…
Browse files Browse the repository at this point in the history
… "pants")

also added a shebang line for easier invokes
  • Loading branch information
lahosken committed Apr 7, 2014
1 parent 30feb5d commit 2b2a83b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/python/pants/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('../../..'))

pants_egg_dir = os.path.abspath('../../../../../.pants.d/python/eggs')
pants_egg_dir = os.path.abspath('../../../../.pants.d/python/eggs')
if not os.path.exists(pants_egg_dir):
raise RuntimeError(''.join([
'Pants egg dependencies do not exist! Please build pants before ',
Expand Down
3 changes: 2 additions & 1 deletion src/python/pants/docs/gen.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

Expand Down Expand Up @@ -58,7 +59,7 @@ def gen_base_reference(rst_filename, dirname):
def copy_builddict(docs_dir):
for filename in ['build_dictionary.rst', 'goals_reference.rst']:
filepath = os.path.abspath(os.path.join(docs_dir,
'../../../../../dist/builddict', filename))
'../../../../dist/builddict', filename))
try:
shutil.copy(filepath, docs_dir)
except IOError as e:
Expand Down

0 comments on commit 2b2a83b

Please sign in to comment.