fritzy/SleekXMPP — Issue #111: support setuptools in setup.py
Author: giampaolo
Created: 2011-11-08 11:40:17+00:00
State: open

Users having setuptools installed might want to take advange of it.
The first example usage which comes to mind is:

$ python setup.py develop

...which lets the user edit the source checkout and do development without having to actually install the package:
http://mail.python.org/pipermail/distutils-sig/2005-July/004692.html

The following change would let users take advange of setuptools remaining backward compatible if setuptools is not installed:

diff --git a/setup.py b/setup.py
index 47f6a1b..8a651d9 100755
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,10 @@
# file, which you should have received as part of this distribution.

import sys
-from distutils.core import setup, Command
+try:
+ from setuptools import setup
+except ImportError:
+ from distutils.core import setup
# from ez_setup import use_setuptools

from testall import TestCommand