title: Including data files with setup.py
body: <p>I'm having trouble including data files in my setup.py script. My package is setup as follows:</p>
  
  <pre><code>my_package/
      setup.py
      MANIFEST.in
  
      my_package/
          __init__.py
          access_data.py
  
          data_files/
              my_data_file.csv
  </code></pre>
  
  <p>I want to include the <code>my_data_file.csv</code> file when installing so that it can be read by <code>access_data.py</code>. To do so I used the <code>package_data</code> keyword in <code>setuptools</code>:</p>
  
  <pre><code>setup(...,
        packages=['my_package'],
        package_data={'my_package': ['./my_package/data_files/my_data_file.csv']},
        include_package_data=True
        )
  </code></pre>
  
  <p>I also included the file in <code>MANIFEST.in</code>:</p>
  
  <pre><code>recursive-include my_package/data_files *
  </code></pre>
  
  <p><code>setup.py</code> seems to run fine and doesn't throw any errors. However, when I import the package I get a file not found error because <code>my_data_file.csv</code> is missing. I have tried referencing other stack overflow questions (particularly <a href="https://stackoverflow.com/questions/1612733/including-non-python-files-with-setup-py">this one</a>) but can't figure out what I'm doing wrong. How can I get setup.py to include the necessary data files?</p>