Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. .PHONY: docs
  2. init:
  3. pip install -r requirements.txt
  4. test:
  5. # This runs all of the tests. To run an individual test, run py.test with
  6. # the -k flag, like "py.test -k test_path_is_not_double_encoded"
  7. py.test tests
  8. coverage:
  9. py.test --verbose --cov-report term --cov=requests tests
  10. ci: init
  11. py.test --junitxml=junit.xml
  12. certs:
  13. curl http://ci.kennethreitz.org/job/ca-bundle/lastSuccessfulBuild/artifact/cacerts.pem -o requests/cacert.pem
  14. deps: urllib3 chardet
  15. urllib3:
  16. git clone https://github.com/shazow/urllib3.git && rm -fr requests/packages/urllib3 && mv urllib3/urllib3 requests/packages/ && rm -fr urllib3
  17. chardet:
  18. git clone https://github.com/chardet/chardet.git && rm -fr requests/packages/chardet && mv chardet/chardet requests/packages/ && rm -fr chardet
  19. publish:
  20. python setup.py register
  21. python setup.py sdist upload
  22. python setup.py bdist_wheel --universal upload
  23. rm -fr build dist .egg requests.egg-info
  24. docs-init:
  25. pip install -r docs/requirements.txt
  26. docs:
  27. cd docs && make html
  28. @echo "\033[95m\n\nBuild successful! View the docs homepage at docs/_build/html/index.html.\n\033[0m"