SETUP - Introducing "setuptools" to a project without risk

Ilias Lazaridis ilias at
Wed Sep 20 12:31:50 CEST 2006

Ilias Lazaridis wrote:
> If I understood things right, setuptools extends the functionality of
> distutils
> Thus replacing within a
> from distutils.core import setup
> with
> try:
>     from setuptools import setup
> except ImportError:
>     from distutils.core import setup
> should have the following behaviour:
> * does not change distutils functionality on any system (with or
> without setuptools installed)
> * adds setuptools functionality on a system with setuptools installed
> This is especially important to obtain the convenient "python
> develop" command.
> Can someone confirm that the addition is non-critical? (I've not asked
> on the setuptools list in order to get a neutral view of users).
> context:

After some conversation with the setuptools developer I've understood
that I had wrong assumptions.

setuptools alters the behaviour of the original distutils commands,
thus the migration in such a way could cause problems.

As suggested by the trac-team, the following is the workaround to use
the setuptools develop command:

python -c "import setuptools; execfile('')" develop


I think setuptools should be non-intrusive. All existent distutils
commands should remain unaltered, exept if the user configures it
differently. This would simplify migration to setuptools, as the
project lead does not have to worry about potential problems.

> --

More information about the Python-list mailing list