0

My python module "suricate" has three sample datasets stored as csv in it. They are used for testing and for examples. The file structure is like:
~/Projects/suricate/data/companydata
Inside companydata I have the files:

 __init__.py //which is empty left.csv right.csv trainingdata.csv 

When I install this module on a virtual env, using pip, I have the following file structure in:

~/anaconda3/envs/myenv/lib/python3.7/sites packages/suricate/data/companydata 

Inside companydata I have the file:
__init__.py
The three csv files are missing

What can I do to make sure the virtualenv copies as well the flat csv files?

Expected: Package in Virtual Env folder has the same flat files as in the local folder

Actual Package in Virtual Env folder has all the *.py files but not the *.csv fles

3

1 Answer 1

0

you need modify setup.py and add the packages and file name in it which you require

setup(..., packages=['mypkg'], package_dir={'mypkg': 'src/mypkg'}, package_data={'mypkg': ['data/*.csv']}, )` 

something like this. give relative path to csv file in packages, add packages u required

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.