summaryrefslogtreecommitdiff
path: root/Makefile
blob: 74b9a673d1d3f8525022cfd5fff82c782a09be4d (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
43
44
45
46
47
48
test: import-cldr
	@PYTHONWARNINGS=default python -m pytest

test-cov: import-cldr
	@PYTHONWARNINGS=default python -m pytest --cov=babel

test-env:
	@virtualenv test-env
	@test-env/bin/pip install pytest
	@test-env/bin/pip install --editable .

clean-test-env:
	@rm -rf test-env

standalone-test: import-cldr test-env
	@test-env/bin/py.test tests

clean: clean-cldr clean-pyc clean-test-env

import-cldr:
	@python scripts/download_import_cldr.py

clean-cldr:
	@rm -f babel/locale-data/*.dat
	@rm -f babel/global.dat

clean-pyc:
	@find . -name '*.pyc' -exec rm {} \;
	@find . -name '__pycache__' -type d | xargs rm -rf

develop:
	@pip install --editable .

tox-test: import-cldr
	@tox

upload-docs:
	$(MAKE) -C docs html dirhtml latex
	$(MAKE) -C docs/_build/latex all-pdf
	cd docs/_build/; mv html babel-docs; zip -r babel-docs.zip babel-docs; mv babel-docs html
	rsync -a docs/_build/dirhtml/ pocoo.org:/var/www/babel.pocoo.org/docs/
	rsync -a docs/_build/latex/Babel.pdf pocoo.org:/var/www/babel.pocoo.org/docs/babel-docs.pdf
	rsync -a docs/_build/babel-docs.zip pocoo.org:/var/www/babel.pocoo.org/docs/babel-docs.zip

release: import-cldr
	python scripts/make-release.py

.PHONY: test develop tox-test clean-pyc clean-cldr import-cldr clean release upload-docs clean-test-env standalone-test