views:

33

answers:

2

I use distribute to package a small python library. I made a directory structure as described in the Hitchhiker's Guide to Packaging.

My question: Where (in the directory structure) do I place an example scripts that shows how to use the library and what changes are necessary to the setup.py?

A: 

I think its good, not to install the examples, rather you can keep your examples folder with your distribution, so it may be on the same level where your setup.py,

If you want to include them, then include as separate module of package, like 'example' - and that directory holds the all example scripts, that users can refer even after installing.

package_data = {
        'module_1': [files],
        'module_2': [files],
        'example': [files],
}
Tumbleweed
A: 

Example scripts are a type of documentation, so install them in the same way you would install other documentation: as package_data.

bstpierre