setup.py 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #! /usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. # setup.py
  4. # Part of enum, a package providing enumerated types for Python.
  5. #
  6. # Copyright © 2007–2009 Ben Finney <ben+python@benfinney.id.au>
  7. # This is free software; you may copy, modify and/or distribute this work
  8. # under the terms of the GNU General Public License, version 2 or later
  9. # or, at your option, the terms of the Python license.
  10. """ Python distutils setup for ‘enum’ distribution.
  11. """
  12. import textwrap
  13. from setuptools import setup, find_packages
  14. distribution_name = "enum"
  15. main_module_name = 'enum'
  16. main_module = __import__(main_module_name)
  17. version = main_module.__version__
  18. main_module_doc = main_module.__doc__.decode('utf-8')
  19. short_description, long_description = (
  20. textwrap.dedent(desc).strip()
  21. for desc in main_module_doc.split('\n\n', 1)
  22. )
  23. setup(
  24. name=distribution_name,
  25. version=version,
  26. packages=find_packages(exclude=["test"]),
  27. py_modules=[main_module_name],
  28. # Setuptools metadata.
  29. zip_safe=False,
  30. install_requires=[
  31. "setuptools",
  32. ],
  33. test_suite="test.test_enum.suite",
  34. # PyPI metadata.
  35. author=main_module.__author_name__,
  36. author_email=main_module.__author_email__,
  37. description=short_description,
  38. license=main_module.__license__,
  39. keywords="enum enumerated enumeration",
  40. url=main_module.__url__,
  41. long_description=long_description,
  42. classifiers=[
  43. # Reference: http://pypi.python.org/pypi?%3Aaction=list_classifiers
  44. "Development Status :: 4 - Beta",
  45. "License :: OSI Approved :: GNU General Public License (GPL)",
  46. "License :: OSI Approved :: Python Software Foundation License",
  47. "Programming Language :: Python",
  48. "Topic :: Software Development :: Libraries :: Python Modules",
  49. "Operating System :: OS Independent",
  50. "Intended Audience :: Developers",
  51. ],
  52. )
  53. # Local variables:
  54. # mode: python
  55. # End:
  56. # vim: filetype=python fileencoding=utf-8 :