From 7a846cf5e35ebcad852309aebaa0bac8a7244744 Mon Sep 17 00:00:00 2001 From: Evax Software Date: Thu, 4 Oct 2012 13:34:39 -0400 Subject: Allow pip install from git Merged with modifications from https://github.com/evax/MySQLdb1/commit/a8152690101733904b16a32ff8467220ca07242c --- setup.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 setup.py (limited to 'setup.py') diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..798f96f --- /dev/null +++ b/setup.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +import os +import sys + +from distribute_setup import use_setuptools +use_setuptools() +from setuptools import setup, Extension + +if not hasattr(sys, "hexversion") or sys.hexversion < 0x02040000: + raise Error("Python 2.4 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'] = [Extension(sources=['_mysql.c'], **options)] +metadata['long_description'] = metadata['long_description'].replace(r'\n', '') +setup(**metadata) -- cgit v1.2.1