diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-08-06 19:22:52 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-08-07 11:18:33 +0900 |
commit | a71985b9defc28b469787393193fdbe5904cab96 (patch) | |
tree | 58fc0100761d144197e969db71ddc0fb8a80839d | |
parent | 5fcb5d59efedd947cbfb7bb1c628ee51037fbab2 (diff) | |
download | pygerrit-a71985b9defc28b469787393193fdbe5904cab96.tar.gz |
Add generation of package documentation
Documentation is generated in html format into the docs folder.
The idea is that with further commits we can automatically generate
and package the documentation into a zip file that can be published
to the package index.
Change-Id: Ia5719bda59b6224fc05e2021e9054e29990ad22a
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 31 | ||||
-rw-r--r-- | doc_requirements.txt | 5 | ||||
-rw-r--r-- | pygerrit/client.py | 2 |
4 files changed, 37 insertions, 2 deletions
@@ -2,5 +2,6 @@ .settings build/ dist/ +docs/ pygerrit.egg-info/ pygerritenv/ @@ -20,10 +20,34 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. +PWD := $(shell pwd) + all: test test: clean unittests pyflakes pep8 pep257 pylint +docs: html + +html: sphinx + bash -c "\ + source ./pygerritenv/bin/activate && \ + export PYTHONPATH=$(PWD) && \ + cd docs && \ + make html && \ + cd $(PWD)" + +sphinx: docenvsetup + bash -c "\ + source ./pygerritenv/bin/activate && \ + sphinx-apidoc \ + -V \"$(TAG)\" \ + -R \"$(TAG)\" \ + -H \"Pygerrit\" \ + -A \"Sony Mobile Communications\" \ + --full \ + --force \ + -o docs pygerrit" + pylint: testenvsetup bash -c "\ source ./pygerritenv/bin/activate && \ @@ -55,6 +79,11 @@ testenvsetup: envsetup source ./pygerritenv/bin/activate && \ pip install --upgrade -r test_requirements.txt" +docenvsetup: envsetup + bash -c "\ + source ./pygerritenv/bin/activate && \ + pip install --upgrade -r doc_requirements.txt" + envsetup: envinit bash -c "\ source ./pygerritenv/bin/activate && \ @@ -65,4 +94,4 @@ envinit: clean: @find . -type f -name "*.pyc" -exec rm -f {} \; - @rm -rf pygerritenv pygerrit.egg-info build dist + @rm -rf pygerritenv pygerrit.egg-info build dist docs diff --git a/doc_requirements.txt b/doc_requirements.txt new file mode 100644 index 0000000..0b3125f --- /dev/null +++ b/doc_requirements.txt @@ -0,0 +1,5 @@ +docutils==0.11 +Jinja2==2.7 +MarkupSafe==0.18 +Pygments==1.6 +Sphinx==1.2b1 diff --git a/pygerrit/client.py b/pygerrit/client.py index 11cc1af..5734ad8 100644 --- a/pygerrit/client.py +++ b/pygerrit/client.py @@ -106,7 +106,7 @@ class GerritClient(object): Return a `GerritEvent` instance, or None if: - `block` is False and there is no event available in the queue, or - `block` is True and no event is available within the time - specified by `timeout`. + specified by `timeout`. """ try: |