473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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:

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 801

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Frans Englich | last post by:
Hello all, Due to the size of my source, I want to split it up into multiple files(basically one class in each file), but then I have difficulties with the directory layout when the modules are...
7
by: Frans Englich | last post by:
This is silly. How do I access data files I've installed with distutils? In a portable, generic way, I want to find out what is the following path on most systems: ...
2
by: RickMuller | last post by:
I really appreciate the ease that the distutils make distributing Python modules. However, I have a question about using them to distribute non-Python (i.e. text) data files that support Python...
7
by: Eric S. Johansson | last post by:
is there anyway I can, in a setup.py file, set and internal equivalent to the '--install-scripts' commandline option? script installation directory but I don't want on the command line where...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.