setup.py 1.8 KB

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