[Distutils] Including documentation in distribution?

P.J. Eby pje at telecommunity.com
Thu Feb 10 18:42:09 CET 2011

At 05:20 PM 2/10/2011 +0100, Johan Ekh wrote:
>my setup.py looks like
>#!/usr/bin/env python
>from setuptools import setup, find_packages
>       version='0.1',
>       description='Cable Toolkit',
>       author='Johan Ekh',
>       author_email='<mailto:johan.ekh at se.abb.com>johan.ekh at se.abb.com',
>       packages=['mypkg',],
>       )

It looks like you're missing a:

    package_dir = {'':'src'}

from that.

>I would like to include the content in "doc/built/html" in my distribution.
>How can I do that?

If you mean your source distribution, you can do that by putting 
those files in revision control (w/appropriate plugin), or by adding 
appropriate directives to a MANIFEST.in file (see the distutils 
documentation for MANIFEST.in).

If you mean you want to install the docs as data in a certain path 
for specific platforms, see the distutils documentation for the 
"install_data" command.

If you want to include the docs in an .egg distribution or 
installation, you'll need to place them either under your .egg-info 
directory, or else put them inside mypkg/ and use 
include_package_data=True or the package_data={} directives.

More information about the Distutils-SIG mailing list