setup.py 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license
  2. #!/usr/bin/env python
  3. #
  4. # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
  5. #
  6. # Permission to use, copy, modify, and distribute this software and its
  7. # documentation for any purpose with or without fee is hereby granted,
  8. # provided that the above copyright notice and this permission notice
  9. # appear in all copies.
  10. #
  11. # THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
  12. # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  13. # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
  14. # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  15. # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  16. # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
  17. # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  18. import sys
  19. from setuptools import setup
  20. version = '1.16.0'
  21. try:
  22. sys.argv.remove("--cython-compile")
  23. except ValueError:
  24. compile_cython = False
  25. else:
  26. compile_cython = True
  27. from Cython.Build import cythonize
  28. ext_modules = cythonize(['dns/*.py', 'dns/rdtypes/*.py', 'dns/rdtypes/*/*.py'])
  29. kwargs = {
  30. 'name' : 'dnspython',
  31. 'version' : version,
  32. 'description' : 'DNS toolkit',
  33. 'long_description' : \
  34. """dnspython is a DNS toolkit for Python. It supports almost all
  35. record types. It can be used for queries, zone transfers, and dynamic
  36. updates. It supports TSIG authenticated messages and EDNS0.
  37. dnspython provides both high and low level access to DNS. The high
  38. level classes perform queries for data of a given name, type, and
  39. class, and return an answer set. The low level classes allow
  40. direct manipulation of DNS zones, messages, names, and records.""",
  41. 'author' : 'Bob Halley',
  42. 'author_email' : 'halley@dnspython.org',
  43. 'license' : 'BSD-like',
  44. 'url' : 'http://www.dnspython.org',
  45. 'packages' : ['dns', 'dns.rdtypes', 'dns.rdtypes.IN', 'dns.rdtypes.ANY', 'dns.rdtypes.CH'],
  46. 'package_data' : {'dns': ['py.typed']},
  47. 'download_url' : \
  48. 'http://www.dnspython.org/kits/{}/dnspython-{}.tar.gz'.format(version, version),
  49. 'classifiers' : [
  50. "Development Status :: 5 - Production/Stable",
  51. "Intended Audience :: Developers",
  52. "Intended Audience :: System Administrators",
  53. "License :: Freeware",
  54. "Operating System :: Microsoft :: Windows :: Windows 95/98/2000",
  55. "Operating System :: POSIX",
  56. "Programming Language :: Python",
  57. "Topic :: Internet :: Name Service (DNS)",
  58. "Topic :: Software Development :: Libraries :: Python Modules",
  59. "Programming Language :: Python :: 2",
  60. "Programming Language :: Python :: 2.7",
  61. "Programming Language :: Python :: 3",
  62. "Programming Language :: Python :: 3.4",
  63. "Programming Language :: Python :: 3.5",
  64. "Programming Language :: Python :: 3.6",
  65. "Programming Language :: Python :: 3.7",
  66. ],
  67. 'python_requires': '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
  68. 'test_suite': 'tests',
  69. 'provides': ['dns'],
  70. 'extras_require': {
  71. 'IDNA': ['idna>=2.1'],
  72. 'DNSSEC': ['pycryptodome', 'ecdsa>=0.13'],
  73. },
  74. 'ext_modules': ext_modules if compile_cython else None,
  75. 'zip_safe': False if compile_cython else None,
  76. }
  77. setup(**kwargs)