472,958 Members | 1,983 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 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 1400
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: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.