Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. test: import-cldr
  2. @PYTHONWARNINGS=default python ${PYTHON_TEST_FLAGS} -m pytest
  3. test-cov: import-cldr
  4. @PYTHONWARNINGS=default python ${PYTHON_TEST_FLAGS} -m pytest --cov=babel
  5. test-env:
  6. @virtualenv test-env
  7. @test-env/bin/pip install pytest
  8. @test-env/bin/pip install --editable .
  9. clean-test-env:
  10. @rm -rf test-env
  11. standalone-test: import-cldr test-env
  12. @test-env/bin/py.test tests
  13. clean: clean-cldr clean-pyc clean-test-env
  14. import-cldr:
  15. @python scripts/download_import_cldr.py
  16. clean-cldr:
  17. @rm -f babel/locale-data/*.dat
  18. @rm -f babel/global.dat
  19. clean-pyc:
  20. @find . -name '*.pyc' -exec rm {} \;
  21. @find . -name '__pycache__' -type d | xargs rm -rf
  22. develop:
  23. @pip install --editable .
  24. tox-test: import-cldr
  25. @tox
  26. upload-docs:
  27. $(MAKE) -C docs html dirhtml latex
  28. $(MAKE) -C docs/_build/latex all-pdf
  29. cd docs/_build/; mv html babel-docs; zip -r babel-docs.zip babel-docs; mv babel-docs html
  30. rsync -a docs/_build/dirhtml/ pocoo.org:/var/www/babel.pocoo.org/docs/
  31. rsync -a docs/_build/latex/Babel.pdf pocoo.org:/var/www/babel.pocoo.org/docs/babel-docs.pdf
  32. rsync -a docs/_build/babel-docs.zip pocoo.org:/var/www/babel.pocoo.org/docs/babel-docs.zip
  33. release: import-cldr
  34. python scripts/make-release.py
  35. .PHONY: test develop tox-test clean-pyc clean-cldr import-cldr clean release upload-docs clean-test-env standalone-test