distribute does not function with subversion 1.6.5

Mike Bayer avatarMike Bayer created an issue

Installed Distribute 0.6:

easy_install Distribute

trying to run against a subversion 1.6.5 checkout "python setup.py sdist", has the same error as that of plain easy_install:

unrecognized .svn/entries format; skipping .

this is running against the Mako templates source tree. It creates a distfile Mako-0.2.5dev-r0.tar.gz, which didn't pick up the version number, and misses all the files that normally get captured due to .svn, thus forcing me to add all filenames to MANIFEST.in manually. It seems to be the identical issue as http://bugs.python.org/setuptools/issue64 and http://bugs.python.org/setuptools/issue79 which has the common setuptools resolution of "it's too complicated, let's just leave the ticket hanging interminably". Wasn't this one (if not *the*) of the primary issues that spurred Distribute to be created (and thus the readily available fixes could be made available) ? I'm also on snow leopard if that adds any clues.

Comments (11)

  1. Anonymous

    Could you also make sure to go into a Python interpreter prompt and do:

    >>> import setuptools
    >>> setuptools
    <module 'setuptools' from '/opt/python/parts/opt/lib/python2.6/site-packages/distribute-0.6-py2.6.egg/setuptools/__init__.pyc'>
    
    

    Make sure to use the Python that is used for the easy_install script you used and that it points to a distribute egg.

    The contents of your easy_install script should look something like this:

    # EASY-INSTALL-ENTRY-SCRIPT: 'distribute==0.6','console_scripts','easy_install'
    __requires__ = 'distribute==0.6'
    import sys
    from pkg_resources import load_entry_point
    
    sys.exit(
       load_entry_point('distribute==0.6', 'console_scripts', 'easy_install')()
    )
    

    Again, this should point to distribute and not setuptools.

  2. Mike Bayer

    OK I am strongly suspecting the issue here is one of Distribute installation or documentation. I applied the patch at http://bugs.python.org/setuptools/issue79 to my setuptools, reinstalled setuptools and that fixed the problem, so I think if I show you my "entries" file you won't see anything unusual.

    What is not clear from the documentation I see at http://pypi.python.org/pypi/distribute/0.6 , is, do I need to do something special inside a setup.py script besides "from setuptools import setup, find_packages" ? I notice when I manually import setuptools and look at file, its still pointing to the setuptools egg - even though I do see some path warnings about "distribute being added to sys.path". Shouldn't this be the distribute egg ?

  3. Mike Bayer

    and then using the "distribute_setup.py" script, now its working. I ran it earlier and it didn't work, but this time I can see it did the switch with "setuptools.OLD" and all that. The documented instructions for "easy_install Distribute" are looking like the culprit at this point since that didn't have the same effect as running distribute_setup.py.

  4. Tarek Ziadé

    The setup.py script shall not change.

    Looks like the install bootstrap process went wrong.

    • How did you install Distribute ?
    • do you have a per-user site-package ? (PEP 370) located in /.local/..
    • are you running in virtualenv ?
    • Can you 'ls' your site-packages directory (everything that starts with distribute* or setuptools*)

    Thanks

  5. Tarek Ziadé

    A ok, my last issue message was sent before I got the chance to read your answer.

    So installing Distribute using "easy_install Distribute" didn't work.

    Still valid questions:

    • do you have a per-user site-package ? (PEP 370) located in /.local/..
    • are you running in virtualenv ?
  6. Mike Bayer
    • How did you install Distribute ?

    "sudo easy_install Distribute"

    • do you have a per-user site-package ? (PEP 370) located in /.local/..

    no I avoid that stuff like the plague. Everything goes into /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages . I will note that in this case, the "distribute-0.6-py2.6.egg" file gets placed successfully every time. It's just the "disable the old setuptools" part that seems to fail.

    • are you running in virtualenv ?

    not for all of these examples no.

    • Can you 'ls' your site-packages directory (everything that starts with distribute* or setuptools*)

    here's the important bits (I retained the "subversion.pth" file in case that somehow gets involved...)

        -rw-r--r--    1 root     wheel  330860 Sep  7 13:36 distribute-0.6-py2.6.egg
        -rw-rw-r--    1 root     admin     876 Sep  7 13:38 easy-install.pth
        -rw-r--r--    1 root     admin  328075 Sep  7 13:38 setuptools-0.6c9-py2.6.egg
        -rw-r--r--    1 root     admin      29 Sep  7 13:38 setuptools.pth
        -rw-r--r--    1 classic  admin      27 Sep  7 12:27 subversion.pth
    

    note that now that it works (via distribute_setup.py), things are correct:

        -rw-r--r--   1 classic  staff  330860 Sep  7 13:49 distribute-0.6-py2.6.egg
        -rw-rw-r--   1 root     admin     876 Sep  7 13:49 easy-install.pth
        drwxr-xr-x   3 root     admin     102 Sep  7 13:54 setuptools-0.6c9-py2.6.egg
        -rw-r--r--   1 root     admin  328075 Sep  7 13:49 setuptools-0.6c9-py2.6.egg.OLD.1252346057.45
        -rw-r--r--   1 root     admin      29 Sep  7 13:49 setuptools.pth
        -rw-r--r--   1 classic  admin      27 Sep  7 12:27 subversion.pth
    
  7. Tarek Ziadé
    • changed status to open

    I have found the problem.

    $ easy_install Distribute

    doesn't trigger the setuptools faking process.

    I am fixing it, but we need to release 0.6.1 in order to make it work.

  8. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.