Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
  2. # Copyright (C) 2003-2017 Nominum, Inc.
  3. #
  4. # Permission to use, copy, modify, and distribute this software and its
  5. # documentation for any purpose with or without fee is hereby granted,
  6. # provided that the above copyright notice and this permission notice
  7. # appear in all copies.
  8. #
  9. # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
  10. # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
  12. # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  14. # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
  15. # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. # $Id: Makefile,v 1.16 2004/03/19 00:17:27 halley Exp $
  17. PYTHON=python
  18. PYTHON3=python3
  19. all:
  20. ${PYTHON} ./setup.py build
  21. install:
  22. ${PYTHON} ./setup.py install
  23. clean:
  24. ${PYTHON} ./setup.py clean --all
  25. find . -name '*.pyc' -exec rm {} \;
  26. find . -name '*.pyo' -exec rm {} \;
  27. rm -f TAGS
  28. distclean: clean docclean
  29. rm -rf build dist
  30. rm -f MANIFEST
  31. doco:
  32. epydoc -v -n dnspython -u http://www.dnspython.org \
  33. dns/*.py dns/rdtypes/*.py dns/rdtypes/ANY/*.py \
  34. dns/rdtypes/CH/*.py \
  35. dns/rdtypes/IN/*.py
  36. dockits: doco
  37. mv html dnspython-html
  38. tar czf html.tar.gz dnspython-html
  39. zip -r html.zip dnspython-html
  40. mv dnspython-html html
  41. docclean:
  42. rm -rf html.tar.gz html.zip html
  43. kits:
  44. ${PYTHON3} ./setup.py sdist --formats=gztar,zip bdist_wheel
  45. tags:
  46. find . -name '*.py' -print | etags -
  47. check: test
  48. test:
  49. cd tests; make PYTHON=${PYTHON} test
  50. test2:
  51. cd tests; make PYTHON=python test
  52. test3:
  53. cd tests; make PYTHON=${PYTHON3} test
  54. lint:
  55. pylint dns tests examples/*.py
  56. lint3:
  57. pylint3 dns tests examples/*.py
  58. typecheck:
  59. if [ $(shell python -c "import sys; print(sys.version_info[0])") -ne 2 ]; then pip install mypy; mypy examples tests; else echo Skipping typecheck on Python 2; fi