package_data not doing recursive glob calls
See original GitHub issueEven though glob supports it, glob support for recursive ** searching is not enabled when specifying package_data. This is not clear in the documentation.
This means that only single *
searches in a specific directory are supported. By changing the glob
function to support recursive, this would allow us to specify **
patterns to a directory instead of having to specify every sub-directory in the structure.
Reference: https://github.com/python/cpython/blob/master/Lib/glob.py#L18
Issue Analytics
- State:
- Created 4 years ago
- Reactions:22
- Comments:13 (4 by maintainers)
Top Results From Across the Web
How to add package data recursively in Python setup.py?
The problem with the glob answer is that it only does so much. I.e. it's not fully recursive. The problem with the copy_tree...
Read more >Using Package Data in Python Projects with Setuptools
These files are called package data, and this article describes how to include them in & access them from your project.
Read more >Data Files Support - Setuptools - Python Packaging Authority
Glob patterns do not automatically match dotfiles (directory or file names ... if the setup.py package_data list is updated before calling setup.py ....
Read more >Including files in source distributions with MANIFEST.in
Adding & removing files to & from the source distribution is done by writing a MANIFEST.in file at the project root. How files...
Read more >Recursive glob? - Unix & Linux Stack Exchange
In order to do recursive globs in bash, you need the globstar feature from Bash version 4 or higher. From the Bash documentation:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Agreed, it would be massively helpful if I could use the
**
glob in setup.py’spackage_data
. I deploy Django apps which include many templates in potentially endless subdirectories. There is no glob pattern except**/*.html
to describe their paths.I just found this issue working with Django templates as well. Recursive glob support would be tremendously helpful when packaging Django apps that include templates