setup.py 495 B

123456789101112131415161718
  1. #!/usr/bin/env python
  2. import os
  3. import sys
  4. from setuptools import setup, Extension
  5. if sys.version_info < (2, 3):
  6. raise Error("Python-2.3 or newer is required")
  7. if os.name == "posix":
  8. from setup_posix import get_config
  9. else: # assume windows
  10. from setup_windows import get_config
  11. metadata, options = get_config()
  12. metadata['ext_modules'] = [Extension(sources=['_mysql.c'], **options)]
  13. metadata['long_description'] = metadata['long_description'].replace(r'\n', '')
  14. setup(**metadata)