How to add package data recursively in Python setup.py?

后端 未结 8 1901
深忆病人
深忆病人 2020-12-13 17:20

I have a new library that has to include a lot of subfolders of small datafiles, and I\'m trying to add them as package data. Imagine I have my library as so:



        
8条回答
  •  感动是毒
    2020-12-13 17:52

    To add all the subfolders using package_data in setup.py: add the number of * entries based on you subdirectory structure

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

提交回复
热议问题