setup.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #!/usr/bin/env python
  2. """Setup script for packaging et_xmfile.
  3. Requires setuptools.
  4. To build the setuptools egg use
  5. python setup.py bdist_egg
  6. and either upload it to the PyPI with:
  7. python setup.py upload
  8. or upload to your own server and register the release with PyPI:
  9. python setup.py register
  10. A source distribution (.zip) can be built with
  11. python setup.py sdist --format=zip
  12. That uses the manifest.in file for data files rather than searching for
  13. them here.
  14. """
  15. import codecs
  16. import sys
  17. import os
  18. import warnings
  19. if sys.version_info < (2, 6):
  20. raise Exception("Python >= 2.6 is required.")
  21. elif sys.version_info[:2] == (3, 2):
  22. warnings.warn("Python 3.2 is no longer officially supported")
  23. from setuptools import setup, Extension, find_packages
  24. import re
  25. here = os.path.abspath(os.path.dirname(__file__))
  26. try:
  27. with codecs.open(os.path.join(here, 'README.rst'), encoding="utf-8") as f:
  28. README = f.read()
  29. except IOError:
  30. README = ''
  31. from et_xmlfile import (
  32. __author__,
  33. __license__,
  34. __author_email__,
  35. __url__,
  36. __version__
  37. )
  38. setup(name='et_xmlfile',
  39. packages=find_packages(),
  40. # metadata
  41. version=__version__,
  42. description="An implementation of lxml.xmlfile for the standard library",
  43. long_description=README,
  44. author=__author__,
  45. author_email=__author_email__,
  46. url=__url__,
  47. license=__license__,
  48. requires=[
  49. 'python (>=2.6.0)',
  50. ],
  51. classifiers=[
  52. 'Development Status :: 5 - Production/Stable',
  53. 'Operating System :: MacOS :: MacOS X',
  54. 'Operating System :: Microsoft :: Windows',
  55. 'Operating System :: POSIX',
  56. 'License :: OSI Approved :: MIT License',
  57. 'Programming Language :: Python',
  58. 'Programming Language :: Python :: 2.6',
  59. 'Programming Language :: Python :: 2.7',
  60. 'Programming Language :: Python :: 3.3',
  61. 'Programming Language :: Python :: 3.4',
  62. ],
  63. )