From 0d1dd6fa894d50ce9bec0f059d60321930ad5277 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sun, 23 Jun 2013 18:16:17 -0400 Subject: Remove distribute dependency. Distribute has been merged with upstream setuptools. The two are incompatible now, so MySQL-python is uninstallable on systems with setuptools >= 0.7 installed. --- setup.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 798f96f..e6dd995 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,6 @@ 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: -- cgit v1.2.1 From bd95bd9d9c915a7779e0409c4daf9cc740cff439 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sun, 23 Jun 2013 18:18:20 -0400 Subject: Replace raise Error with distutils exception. Distutils has an exceptions heirarchy. Use it. --- setup.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index e6dd995..73b3f6b 100644 --- a/setup.py +++ b/setup.py @@ -3,17 +3,19 @@ import os import sys -from setuptools import setup, Extension +import distutils.errors +import setuptools if not hasattr(sys, "hexversion") or sys.hexversion < 0x02040000: - raise Error("Python 2.4 or newer is required") + raise distutils.errors.DistutilsError("Python 2.4 or newer is required") if os.name == "posix": from setup_posix import get_config -else: # assume windows +else: # assume windows from setup_windows import get_config metadata, options = get_config() -metadata['ext_modules'] = [Extension(sources=['_mysql.c'], **options)] +metadata['ext_modules'] = [ + setuptools.Extension(sources=['_mysql.c'], **options)] metadata['long_description'] = metadata['long_description'].replace(r'\n', '') -setup(**metadata) +setuptools.setup(**metadata) -- cgit v1.2.1