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

Chris Withers chris at simplistix.co.uk
Wed Sep 9 10:21:39 CEST 2009


Hi Reinout,

I'm afraid you're getting confused...

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.

> Yes: "bin/buildout setup setup.py something" tells buildout to run the
> "something" command with the setup.py in the current directory. And that won't
> be sphinx' setup.py.

It doesn't need to be Sphinx's setup.py, distutils.commands, as an entry 
point, adds commands to disutuils (eg: bdist_egg, etc)

> Secondly: such an console_scripts entry point only tells setuptools (and
> buildout) to install that script in the bin directory.  It is not an extra
> setup.py command (like "sdist" and "build").  For that, you need a different
> entry point.

Yes, the distutils.commands entry point, which defines build_sphinx 
*not* sphinx_build ;-)

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?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk


More information about the Distutils-SIG mailing list