Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 75 lines (57 sloc) 2.039 kB
8d82b30 @majek Infrastructure for sphinx documentation.
authored
1 CODEGEN_DIR=../rabbitmq-codegen
a932c23 @majek _
authored
2 AMQP_JSON_SPEC=$(CODEGEN_DIR)/amqp-rabbitmq-0.9.1.json
86e4354 @majek _
authored
3
a932c23 @majek _
authored
4 PYTHON=python
86e4354 @majek _
authored
5
e02ef6f @majek Checkout submodule on make
authored
6 all: vendor/rabbitmq-codegen/amqp_codegen.py puka/spec.py puka/spec_exceptions.py tests
8da28ee @majek https:// is better than git://, checkout submodules on make
authored
7
e02ef6f @majek Checkout submodule on make
authored
8 vendor/rabbitmq-codegen/amqp_codegen.py:
13d7393 @majek git submodule init&update can be in one line.
authored
9 git submodule update --init
a932c23 @majek _
authored
10
11 $(AMQP_JSON_SPEC):
12 @echo "You need '$(CODEGEN_DIR)' package."
13 @echo "Try one of the following:"
c503c3c Expecting rabbitmq-codegen to be at the parent directory isn't a very…
Jakub Šťastný aka Botanicus authored
14 @echo " git submodule init && git submodule update"
a932c23 @majek _
authored
15 @exit 1
16
bbbb068 @majek Missed dependency in Makefile.
authored
17 puka/spec.py: codegen.py codegen_helpers.py \
18 $(CODEGEN_DIR)/amqp_codegen.py \
a932c23 @majek _
authored
19 $(AMQP_JSON_SPEC) amqp-accepted-by-update.json
192a575 @majek Codegen is now responsible for exceptions.
authored
20 $(PYTHON) codegen.py spec $(AMQP_JSON_SPEC) puka/spec.py
21
bbbb068 @majek Missed dependency in Makefile.
authored
22 puka/spec_exceptions.py: codegen.py codegen_helpers.py \
23 $(CODEGEN_DIR)/amqp_codegen.py \
192a575 @majek Codegen is now responsible for exceptions.
authored
24 $(AMQP_JSON_SPEC) amqp-accepted-by-update.json
25 $(PYTHON) codegen.py spec_exceptions $(AMQP_JSON_SPEC) puka/spec_exceptions.py
a932c23 @majek _
authored
26
27 clean:
28 find . -name \*pyc|xargs --no-run-if-empty rm
36c336c @majek get distclean to clean everything
authored
29 rm -f tests/.coverage distribute-0.6.10.tar.gz
4359f21 @majek Playing with venv
authored
30 rm -rf venv
a932c23 @majek _
authored
31
192a575 @majek Codegen is now responsible for exceptions.
authored
32 distclean: clean
33 rm -f puka/spec.py puka/spec_exceptions.py
36c336c @majek get distclean to clean everything
authored
34 rm -rf build dist puka.egg-info
a932c23 @majek _
authored
35
1553baf @majek Proper handling of channel.close.
authored
36 .PHONY: tests prerequisites
37
6178e94 @majek Parametrize testing amqp_url
authored
38 TEST_AMQP_URL:=amqp://127.0.0.1/
39
a932c23 @majek _
authored
40 test: tests
41 tests: puka/spec.py
6178e94 @majek Parametrize testing amqp_url
authored
42 cd tests && AMQP_URL=$(TEST_AMQP_URL) PYTHONPATH=.. $(PYTHON) tests.py ../puka puka puka.urlparse
4359f21 @majek Playing with venv
authored
43
44
45 venv:
46 virtualenv --no-site-packages venv
47 ./venv/bin/easy_install coverage
d3e2cca @majek More experiments with python-venv
authored
48 ./venv/bin/easy_install nose
4359f21 @majek Playing with venv
authored
49 ./venv/bin/easy_install sphinx
d3e2cca @majek More experiments with python-venv
authored
50
8d82b30 @majek Infrastructure for sphinx documentation.
authored
51 DOCS=../puka-gh-pages
52 $(DOCS):
53 mkdir $(DOCS)
54 git clone git@github.com:majek/puka.git $(DOCS)
55 cd $(DOCS) && \
56 git branch -f gh-pages origin/gh-pages && \
57 git checkout gh-pages
58
59 generate-docs: $(DOCS) venv
75970dc @majek pull before and after building docs
authored
60 cd $(DOCS) && git pull
8d82b30 @majek Infrastructure for sphinx documentation.
authored
61 ./venv/bin/sphinx-build -b html docs $(DOCS)
62 echo '<meta http-equiv="refresh" content="0;url=./puka.html">' > \
63 $(DOCS)/index.html
64 echo > $(DOCS)/.nojekyll
7662315 @majek Futile effort to write docs continues.
authored
65
66 push-docs:
8d82b30 @majek Infrastructure for sphinx documentation.
authored
67 cd $(DOCS) && \
68 git add . && \
69 git commit -m "Generated documentation" && \
70 git push origin gh-pages:gh-pages
75970dc @majek pull before and after building docs
authored
71 git pull
4359f21 @majek Playing with venv
authored
72
d3e2cca @majek More experiments with python-venv
authored
73 nose: venv
74 AMQP_URL=amqp:/// ./venv/bin/nosetests --cover-erase --with-coverage --cover-package puka --with-doctest
Something went wrong with that request. Please try again.