2

I am creating a python package (for the first time) and am able to package contents but I am having issue with packaging one of the data files that I have in subdirectory. My directory structure looks like this

├── Jenkinsfile
├── MANIFEST.in
├── README.md
├── __init__.py
├── country
│       ├── __init__.py
│       └── folder1
│           ├── file1.py
│           ├── file2.py
│           ├── file3.py
│           ├── folder2
│               ├── file4.xlsx
│               ├── __init__.py
├── repoman.yaml
├── requirements.txt
├── setup.py
└── test
    └── unit
           ├──── __init__.py
           ├──── test_unit.py

my setup.py has the following get_packages() method

def get_packages():
    return find_packages(exclude=['doc', 'imgs', 'test'])

when I build the package, my package does not include file4.xlsx, can anyone tell me why is that the case and how can I fix it?

user1596115
  • 321
  • 1
  • 5
  • 17
  • This is a duplicate of [setuptools: adding additional files outside package](https://stackoverflow.com/questions/32609248/setuptools-adding-additional-files-outside-package) – Louis Aug 26 '20 at 14:33
  • isn't that implied from the accepted answer below? – user1596115 Sep 10 '20 at 16:10

1 Answers1

0

I found this answer which is similar to what I want to do

I had to update my setup.py to include package_data and MANIFEST.in to include *.xlsx file (by providing the full directory path to excel file)

user1596115
  • 321
  • 1
  • 5
  • 17