471,831 Members | 1,058 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,831 software developers and data experts.

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:

|-- __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

packages=['ExampleTree', ExampleTree/data',
package_dir={'data' : 'ExampleTree/data'},
package_data={'data': ['Example1.txt', 'Example2.txt']},

What am I doing incorrectly?

Jan 18 '07 #1
0 769

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.