[Distutils] [buildout] How do I use stuff specified in the distutils.command entry_point?

Reinout van Rees reinout at vanrees.org
Wed Sep 9 12:40:42 CEST 2009


On 2009-09-09, Chris Withers <chris at simplistix.co.uk> wrote:
>
> I'm afraid you're getting confused...

You're right :-)

> Reinout van Rees wrote:
>>> And based on the entry points listed here:
>>>
>>> http://bitbucket.org/birkenfeld/sphinx/src/447109cf9b01/setup.py#cl-182
>
> I'm referring to the distutils.commands entry point in the above *not* 
> console_scripts.

Missed that one.

> The problem is that bin/buildout only has zc.buildout and setuptools 
> available as eggs, so "bin/buildout setup setup.py" seems a bit limited 
> to me :-S
>
> I found a workaround, which was to define an interpreter in my [sphinx] 
> section and then do:
>
> bin/py setup.py build_sphinx
>
> ...but that just felt a bit wrong :-S
>
> Can anyone tell me what the *right* way is to get this to work?

>From what I've seen, your workaround is the right way to do it.  The one item
that struck me is that not even the recipe eggs end up on bin/buildout's
sys.path.  So buildout is about setting stuff up in the right way so that
subsequent commands can run OK.

Until you talked about it, I never encountered "bin/buildout setup setup.py",
so I wonder how common it is.  It also means I should probably shut up about
it to prevent saying dumb things :-)


Btw: there is a recipe for setting up a sphinx area in your buildout:
http://pypi.python.org/pypi/collective.recipe.sphinxbuilder/0.6.3

Personally I use it just once to create a directory structure in my buildout.
Afterwards I store the results in svn and rip out
collective.recipe.sphinxbuilder again to allow me to edit config files
directly instead of having them generated.


Reinout

-- 
Reinout van Rees - reinout at vanrees.org - http://reinout.vanrees.org
Software developer at http://www.thehealthagency.com
"Military engineers build missiles. Civil engineers build targets"



More information about the Distutils-SIG mailing list