add data files to python projects setup.py

I used data_files

data_files = [('', ['negar/data/untouchable.dat'])],

Maybe try:

package_data={'negar/data': ['data/*.dat']},

The first problem is that I didn't import my data file into the package with MANIFEST.in file. I imported it like this:

include negar/data/*.dat

After that my data file already imported with my package install. but because I had mistakes in open my data files, python couldn't find it. this question helped me to find the right way Python Access Data in Package Subdirectory and now I use something like this:

import os
this_dir, this_filename = os.path.split(__file__)
DATA_PATH = os.path.join(this_dir, "data", "data.txt")
print open(DATA_PATH).read()