SETUP - Introducing "setuptools" to a project without risk

I

Ilias Lazaridis

If I understood things right, setuptools extends the functionality of
distutils

Thus replacing within a setup.py:

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 setup.py
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: http://trac.edgewall.org/ticket/3743

..
 
I

Ilias Lazaridis

Ilias said:
If I understood things right, setuptools extends the functionality of
distutils

Thus replacing within a setup.py:

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 setup.py
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: http://trac.edgewall.org/ticket/3743

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('setup.py')" 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top