471,579 Members | 1,283 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,579 software developers and data experts.

SETUP - Introducing "setuptools" to a project without risk

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

..

--
http://lazaridis.com

Sep 18 '06 #1
1 1299
Ilias Lazaridis wrote:
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.
--
http://lazaridis.com
Sep 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by limodou | last post: by
14 posts views Thread by Nader Emami | last post: by
2 posts views Thread by seb.haase | last post: by
3 posts views Thread by =?iso-8859-1?q?KLEIN_St=E9phane?= | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by lumer26 | last post: by
reply views Thread by Vinnie | last post: by
1 post views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.