469,364 Members | 2,346 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,364 developers. It's quick & easy.

distutils data file difficulties

I am new to the use of distutils and am having difficulty getting
distutils recognize and install data files. Here are the relevant parts
of my source directory:

ExampleTree/
|-- __init__.py
|-- data
| |-- Example1.txt
| |-- Example2.txt
| `-- __init__.py
|-- subPackage1
| |-- (...)
`-- subPackage2
|-- (...)

I would like to install Example1.txt and Example2.txt under data/ upon
installation. I cannot seem to write a proper setup.py to accomplish
this. Here are the relevant bits of my setup.py:

#!/usr/bin/env python

from distutils.core import setup

setup(name="ExampleTree",
(...),
packages=['ExampleTree', ExampleTree/data',
'ExampleTree/subPackage1',
''ExampleTree/subPackage2'],
package_dir={'data' : 'ExampleTree/data'},
package_data={'data': ['Example1.txt', 'Example2.txt']},
)

What am I doing incorrectly?

Jan 18 '07 #1
0 743

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Frans Englich | last post: by
7 posts views Thread by Frans Englich | last post: by
2 posts views Thread by RickMuller | last post: by
7 posts views Thread by Eric S. Johansson | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.