SETUP - Introducing "setuptools" to a project without risk

Discussion in 'Python' started by Ilias Lazaridis, Sep 18, 2006.

  1. 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
     
    Ilias Lazaridis, Sep 18, 2006
    #1
    1. Advertising

  2. 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
     
    Ilias Lazaridis, Sep 20, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrey Tarasevich
    Replies:
    2
    Views:
    478
    Andrey Tarasevich
    Aug 19, 2005
  2. Pete Bleackley

    Introducing myself and my project

    Pete Bleackley, Sep 19, 2006, in forum: VHDL
    Replies:
    3
    Views:
    577
    rickman
    Sep 20, 2006
  3. Ben Finney
    Replies:
    29
    Views:
    599
  4. Chadrik

    setuptools setup.py and "extras"

    Chadrik, Apr 22, 2009, in forum: Python
    Replies:
    0
    Views:
    284
    Chadrik
    Apr 22, 2009
  5. Rob Kaufman
    Replies:
    0
    Views:
    99
    Rob Kaufman
    Mar 18, 2009
Loading...

Share This Page