Issue #64 resolved

setup.py rebuilds the distribute egg every.single.time.

Daniel Stutzbach
created an issue

I'm using distribute_setup_3k.py (downloaded from nightly a few minutes ago) with Python 3.1 for Windows. Every time I run setup.py (even if only with --help), it rebuilds the distribute egg. Needless to say, this does not make for a very responsive user experience. :-)

I've attached the complete output, in case it is useful in diagnosis. There appear to be a few errors while building the egg, although it does eventually print the help.

Comments (8)

  1. Lennart Regebro

    Which setup.py, more exactly?

    I get one error when I build distribute now, it tries to run 2to3 on distribute_setup_3k.py, which of course fails, we should fix that. The distribute_setup* files should probably be in a subdirectory or something anyway. Or maybe excluded in the MANIFEST.in.

    Anyway, it works fine for me. It will of course re-run 2to3 everytime you run distribute_setup_3k.py, but you only need to run that once (unless you forget to do sudo, or course).

  2. Daniel Stutzbach reporter

    Sorry, forgot to specify. The setup.py is for my blist extension module. I'm experimenting with using distribute_setup_3k for building it under Python 3. It essentially looks like this:

    import distribute_setup_3k
    distribute_setup_3k.use_setuptools()
    from distutils.core import setup, Extension
    
    setup(lots_of_arguments)
    

    Distribute is *not* installed in site-packages, so setup.py needs to download it (after all, a user downloading the source tar.gz for my extension module may not have distribute installed).

    Let me know if there's any other information I can provide.

  3. Daniel Stutzbach reporter

    After seeing this problem under Linux (in addition to under Windows as I already reported), I dug into it a little further and found the difference between ez_setup.py and distribute_setup.py.

    First, the use_setuptools() function in both scripts checks to see if "import pkg_resources" works. If it does and the right version of setuptools/distribute is installed, great. No problems. The problem I'm experiencing only occurs if distribute isn't installed globally.

    In ez_setup.py, the use_setuptools() function checks to see if the egg already exists. If not, it downloads the egg.

    In distribute_setup.py, the use_setuptools() function checks to see if the .tar.gz already exists. If not, it downloads the .tar.gz. Either way, it rebuilds the egg.

    I have a short patch to fix the problem. I'll submit it as soon as I figure out Mercurial. :-)

  4. Daniel Stutzbach reporter

    Commit access is always nice. What's the workflow for making sure that any other patches I come up with are reviewed? Start a 0.6-maintenance-stutzbach branch?

  5. Tarek Ziadé repo owner

    What's the workflow for making sure that any other patches I come up with are reviewed?

    I and others are watching the commits, and they are pushed on #distutils irc channels as well.

    (I can make a checkins mailing list for conveniency)

    Do you mind pulling your branch (I have added you)

    Thank you !

  6. Log in to comment