473,405 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 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 1417
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: limodou | last post by:
I'm new to setuptools. One question is: Recently I want to use setuptools for a project. My command line is just like : python setup.py sdist --formats=gztar But I found some deleted...
1
by: alex23 | last post by:
Hey everyone, I'm trying to install setuptools on a work PC behind an NTLM firewall. I've tried to use APS as recommended but am still unable to have anything other than IE talk through...
14
by: Nader Emami | last post by:
I have installed "TurboGears" and I would install 'pysqlite' also. I am a user on a Linux machine. If I try to install the 'pysqlite' with 'easy_install' tool I get the next error message. The...
4
by: Stef Mientki | last post by:
hello, after 4 months playing around with Python, and I still have troubles with egg files. Sometimes it works, sometimes it doesn't. If I google on "python egg", I get lost of links, which...
2
by: seb.haase | last post by:
Hi, I am distributing a package with a precompiled collection of modules and packages useful for Python based medical/biological/astronomical image analysis and algorithm development. (Codename:...
8
by: Edward A. Falk | last post by:
IOW, is there a "linker" for python? I've written a program comprised of about five .py files. I'd like to find a way to combine them into a single executable. Obviously, I could hand-edit them...
4
by: Alia Khouri | last post by:
Can we open up the discussion here about how to improve setuptools which has become the de facto standard for distributing / installing python software. I've been playing around with ruby's gems...
3
by: =?iso-8859-1?q?KLEIN_St=E9phane?= | last post by:
Hi, for example, in http://svn.zope.org/zc.buildout/trunk/src/zc/buildout/ tests.py?rev=89831&view=auto test file, there is this doctests : def develop_verbose(): """ We should be able to...
0
by: Terry Reedy | last post by:
KLEIN Stéphane wrote: 'ls' is the unix abbreviation for the shell command 'list files (in a directory)'. The name is used above for a similar Python function. It presumably was imported...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.