File: setup.py

package info (click to toggle)
python-mysqldb 1.3.7-1~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 508 kB
  • sloc: python: 2,856; ansic: 2,804; makefile: 6
file content (21 lines) | stat: -rw-r--r-- 588 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python

import os
import sys

import distutils.errors
import setuptools

if not hasattr(sys, "hexversion") or sys.hexversion < 0x02060000:
    raise distutils.errors.DistutilsError("Python 2.6 or newer is required")

if os.name == "posix":
    from setup_posix import get_config
else:  # assume windows
    from setup_windows import get_config

metadata, options = get_config()
metadata['ext_modules'] = [
    setuptools.Extension(sources=['_mysql.c'], **options)]
metadata['long_description'] = metadata['long_description'].replace(r'\n', '')
setuptools.setup(**metadata)