summaryrefslogtreecommitdiff
path: root/makefile
blob: c645d5ab2e9da70e3bea5d3838691713eefebcb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
.PHONY: test upload clean bootstrap setup assert-converted-readme

test: bootstrap
	_virtualenv/bin/nosetests tests

test-all: setup
	_virtualenv/bin/tox
	make clean
	
upload: setup assert-converted-readme
	python setup.py sdist upload
	make clean
	
register: setup
	python setup.py register

README:
	pandoc --from=markdown --to=rst README.md > README || cp README.md README

assert-converted-readme:
	test "`cat README`" != "`cat README.md`"

clean:
	rm -f README
	rm -f MANIFEST
	rm -rf dist
	
bootstrap: _virtualenv jq.c setup
	_virtualenv/bin/pip install -e .
ifneq ($(wildcard test-requirements.txt),) 
	_virtualenv/bin/pip install -r test-requirements.txt
endif
	make clean

setup: README

_virtualenv: 
	virtualenv _virtualenv

jq.c: _virtualenv jq.pyx
	_virtualenv/bin/pip install cython
	_virtualenv/bin/cython jq.pyx