0

I spent significant time, finding solution to this one problem :

My setup.py is as follow :

install_requires=install_requires,
python_requires='>=3.6.5',

include_package_data=True,

#### CLI
scripts = scripts,

However, when pip install -e . , it does not copy into MYpackages/ the *.csv, *.txt files. How to add it ?

Following ressources were checked:

Is it possible to include csv file as part of python package

https://python-packaging.readthedocs.io/en/latest/non-code-files.html

phd
  • 82,685
  • 13
  • 120
  • 165
tensor
  • 3,088
  • 8
  • 37
  • 71

1 Answers1

2

As the links above do not mentionned, we need to this extra line in setup.py :

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

and add in MANIFEST.IN File

recursive-include YourPackage/data/*.csv
tensor
  • 3,088
  • 8
  • 37
  • 71