setup.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #!/usr/bin/env python
  2. from __future__ import absolute_import
  3. import sys
  4. from distutils.core import Command
  5. import subprocess
  6. from setuptools import setup
  7. import defusedxml
  8. class PyTest(Command):
  9. user_options = []
  10. def initialize_options(self):
  11. pass
  12. def finalize_options(self):
  13. pass
  14. def run(self):
  15. errno = subprocess.call([sys.executable, "tests.py"])
  16. raise SystemExit(errno)
  17. long_description = []
  18. with open("README.txt") as f:
  19. long_description.append(f.read())
  20. with open("CHANGES.txt") as f:
  21. long_description.append(f.read())
  22. setup(
  23. name="defusedxml",
  24. version=defusedxml.__version__,
  25. cmdclass={"test": PyTest},
  26. packages=["defusedxml"],
  27. author="Christian Heimes",
  28. author_email="christian@python.org",
  29. maintainer="Christian Heimes",
  30. maintainer_email="christian@python.org",
  31. url="https://github.com/tiran/defusedxml",
  32. download_url="https://pypi.python.org/pypi/defusedxml",
  33. keywords="xml bomb DoS",
  34. platforms="all",
  35. license="PSFL",
  36. description="XML bomb protection for Python stdlib modules",
  37. long_description="\n".join(long_description),
  38. classifiers=[
  39. "Development Status :: 5 - Production/Stable",
  40. "Intended Audience :: Developers",
  41. "License :: OSI Approved :: Python Software Foundation License",
  42. "Natural Language :: English",
  43. "Programming Language :: Python",
  44. "Programming Language :: Python :: 2",
  45. "Programming Language :: Python :: 2.7",
  46. "Programming Language :: Python :: 3",
  47. "Programming Language :: Python :: 3.4",
  48. "Programming Language :: Python :: 3.5",
  49. "Programming Language :: Python :: 3.6",
  50. "Topic :: Text Processing :: Markup :: XML",
  51. ],
  52. )