6

Since upgrading to subversion 1.7 I get "unrecognized .svn/entries format" when running buildout. I notice there is an unresolved bug reports for both distribute and setuptools for this error and it also seems that you can use setuptools_subversion to resolve the issue.

What I can't find out how to do is install setuptools_subversion so that buildout picks it up. Please can someone help?

I've tried

  • downloading it and running python setup.py install
  • adding it to the eggs list of the [buildout] part of my buildout configuration
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
scarba05
  • 2,943
  • 1
  • 27
  • 29

1 Answers1

4

You need to install it at the python site-packages level; easy_install (used under the hood by buildout) needs it available before it'll install anything else.

That said, the python setup.py install stanza should have installed it just fine; check by running the following test:

$ python -m setuptools_subversion
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools_subversion.py directory

That should print the installation path of the module, like it did for me in the above example. You could try to use pip or easy_install for automatic download:

$ pip install setuptools_subversion

or

$ easy_install setuptools_subversion

You can do that in a virtualenv if you want to isolate the installation. Because this is basically a dependency for svn 1.7, installing this at the same level as the svn binary (usually system wide) is certainly acceptable and the norm.

Note that the unrecognized .svn/entries format error message will not disappear, but your buildout will otherwise succeed. The message is printed no matter what as easy_install first tries the internal .svn parser before deferring to the external plugin.

If you really, really want to verify if the plugin is installed, run the following python code:

import pkg_resources
for entrypoint in pkg_resources.iter_entry_points('setuptools.file_finders'):
    print entrypoint

On my system this prints:

svn = setuptools_subversion:listfiles
svn_cvs = setuptools.command.sdist:_default_revctrl
git = setuptools_git:gitlsfiles
hg = setuptools_hg:hg_file_finder
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • Thanks Martijn. It turns out it was installed - I was getting confused because the `unrecognized .svn/entries format` was still appearing and because when trying to build a revision egg I was getting -r0. I guess that's for another issue though – scarba05 Mar 26 '12 at 19:08
  • Once you have install `setuptools_subversion` you need to manually remove the original `setuptools` installation from the `setuptools.pth` or `easy install.pth` file. – sakra Sep 18 '13 at 08:15
  • 1
    @sakra: `setuptools_subversion` is **not** a replacement! You *not* remove `setuptools` itself. – Martijn Pieters Sep 18 '13 at 08:16
  • 1
    @sakra: `setuptools_subversion` is a *plugin* for `setuptools`. You need *both*. – Martijn Pieters Sep 18 '13 at 08:17
  • @MartijnPieters So to use `setuptools_subversion` you just have to install it, nothing more to configure? – Joril Nov 05 '16 at 15:42
  • 1
    @Joril: yes, because installing it [registers an entry point](https://github.com/mjpieters/setuptools_subversion/blob/master/setup.py#L35-L38); `setuptools` looks for that entry point. – Martijn Pieters Nov 05 '16 at 15:51