Django helper application around pypiwik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.0KB

  1. TARGET?=tests
  2. SRC_PATH := django_pypiwik
  3. VERSION := $(shell grep -Po '"(.*)"' $(SRC_PATH)/__init__.py | sed -e 's/"//g')
  4. #test_default_python:
  5. # PYTHONPATH="." python tests/ -v
  6. #
  7. #test_py2:
  8. # @echo Executing test with python2
  9. # PYTHONPATH="." python2 tests/ -v
  10. #
  11. #test_py3:
  12. # @echo Executing test with python3
  13. # PYTHONPATH="." python3 tests/ -v
  14. #
  15. #test: test_py2 test_py3
  16. compile:
  17. @echo Compiling python code
  18. python -m compileall $(SRC_PATH)/
  19. compile_optimized:
  20. @echo Compiling python code optimized
  21. python -O -m compileall $(SRC_PATH)/
  22. coverage:
  23. coverage erase
  24. PYTHONPATH="." coverage run --source='$(SRC_PATH)' --branch tests/__main__.py
  25. coverage xml -i
  26. coverage report -m
  27. sonar:
  28. /usr/local/bin/sonar-scanner/bin/sonar-scanner -Dsonar.projectVersion=$(VERSION)
  29. clean:
  30. find -name "*.py?" -delete
  31. rm -f coverage.xml testresults.xml
  32. rm -fr htmlcov dist build *.egg-info
  33. release:
  34. python setup.py sdist upload -r pypi
  35. travis: compile compile_optimized # test_default_python coverage
  36. jenkins: travis sonar