You're going to have to use a custom function to do this as part of your setup.py
:
def copy_dir():
dir_path = 'YOUR_DIR_HERE'
base_dir = os.path.join('MODULE_DIR_HERE', dir_path)
for (dirpath, dirnames, files) in os.walk(base_dir):
for f in files:
yield os.path.join(dirpath.split('/', 1)[1], f)
Then I set this as my package_data
:
package_data = {
'' : [f for f in copy_dir()]
},
Note that this should also work if you're using data_files
. Make sure that you call the function as part of a list comprehension - apparently setuptools doesn't play nice with list-alikes instead of straight up lists.