# build-site.py

**URL:** <https://forum.ansible.com/t/build-site-py/12447>\
**Category:** Ansible Project\
**Created:** [March 2, 2013, 8:27am UTC](https://forum.ansible.com/t/build-site-py/12447 "2013-03-02T08:27:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yves\_Dorfsman](https://avatars.discourse-cdn.com/v4/letter/y/9de0a6/32.png) [@Yves\_Dorfsman](https://forum.ansible.com/u/Yves_Dorfsman)\
**Post date:** [March 2, 2013, 8:27am UTC](https://forum.ansible.com/t/build-site-py/12447/1 "2013-03-02T08:27:31Z")

</div>

Is build-site.py brocken, or am I missing something?  
I do:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd docsite  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;./build-site.py

Then the modules.html does not include any of the module....

Thanks.

---

<div class="post-metadata">

**Author:** ![jpmens1](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jpmens1](https://forum.ansible.com/u/jpmens1)\
**Post date:** [March 2, 2013, 9:26am UTC](https://forum.ansible.com/t/build-site-py/12447/2 "2013-03-02T09:26:10Z")

</div>

> Is build-site.py brocken, or am I missing something?  
> I do:
> 
> &nbsp;&nbsp;&nbsp;&nbsp;cd docsite  
> &nbsp;&nbsp;&nbsp;&nbsp;./build-site.py
> 
> Then the modules.html does not include any of the module....

You should be able to `make docs' from the main directory; works here.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-JP

---

<div class="post-metadata">

**Author:** ![Yves\_Dorfsman](https://avatars.discourse-cdn.com/v4/letter/y/9de0a6/32.png) [@Yves\_Dorfsman](https://forum.ansible.com/u/Yves_Dorfsman)\
**Post date:** [March 2, 2013, 4:54pm UTC](https://forum.ansible.com/t/build-site-py/12447/3 "2013-03-02T16:54:33Z")

</div>

Weird... I get this error for every module:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rst/modules/\_list.rst:2: (SEVERE/4) Problems with "include" directive path:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IOError: [Errno 2] No such file or directory: 'rst/modules/modules/add\_host.rst'.

Notice the directory "modules" is repeated twice. I just added a soft link in modules to itself, it gets me by to be able to look at the html output, which is all I want for now. But still, I wonder what I'm doing wrong.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [March 2, 2013, 5:14pm UTC](https://forum.ansible.com/t/build-site-py/12447/4 "2013-03-02T17:14:00Z")

</div>

try

source ./hacking/env-setup

before you build?

---

<div class="post-metadata">

**Author:** ![Yves\_Dorfsman](https://avatars.discourse-cdn.com/v4/letter/y/9de0a6/32.png) [@Yves\_Dorfsman](https://forum.ansible.com/u/Yves_Dorfsman)\
**Post date:** [March 3, 2013, 8:20pm UTC](https://forum.ansible.com/t/build-site-py/12447/5 "2013-03-03T20:20:33Z")

</div>

> > > > Is build-site.py brocken, or am I missing something?  
> > > > I do:
> > > > 
> > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd docsite  
> > > > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;./build-site.py
> > > > 
> > > > Then the modules.html does not include any of the module....
> > > 
> > > You should be able to `make docs' from the main directory; works here.
> > 
> > Weird... I get this error for every module:  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rst/modules/\_list.rst:2: (SEVERE/4) Problems with "include" directive  
> > path:  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IOError: [Errno 2] No such file or directory:  
> > 'rst/modules/modules/add\_host.rst'.
> > 
> > Notice the directory "modules" is repeated twice. I just added a soft link  
> > in modules to itself, it gets me by to be able to look at the html output,  
> > which is all I want for now. But still, I wonder what I'm doing wrong.
> 
> source ./hacking/env-setup
> 
> before you build?

Thanks for all the suggestions. I had a lot of left over files from previous make runs, I completely clean my repo until I got a clean "git pull upstream", and now it builds the docs correctly.

---

<div class="post-metadata">

**Author:** ![Greg\_Andrews](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@Greg\_Andrews](https://forum.ansible.com/u/Greg_Andrews)\
**Post date:** [March 4, 2013, 3:27am UTC](https://forum.ansible.com/t/build-site-py/12447/6 "2013-03-04T03:27:13Z")

</div>

Is there an undocumented dependence on Sphinx for “make docs” and “make deb”? I’m on Ubuntu 12.04 and would get this error for both make commands:

[lines removed]  
make[1]: Entering directory `/home/ops/src/ansible/docsite' [lines removed] processing module source ---> ../library/yum processing module source ---> ../library/zfs ./build-site.py Traceback (most recent call last): File "./build-site.py", line 24, in <module> from sphinx.application import Sphinx ImportError: No module named sphinx.application make[1]: *** [docs] Error 1 make[1]: Leaving directory `/home/ops/src/ansible/docsite’  
make: \*\*\* [webdocs] Error 2

After installing the Ubuntu package “python-sphinx” (and its dependencies) Sphinx was invoked and the builds were successful.

Thanks,

-Greg

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [March 4, 2013, 4:25am UTC](https://forum.ansible.com/t/build-site-py/12447/7 "2013-03-04T04:25:06Z")

</div>

Yes, if someone wants, we can add this to the getting started docs.

Just send a pull request for the files in docsite/rst/\*.rst !
