I have a lot of media assets to include in my python rpm.  I am confused as to the best way to include these files in my rpm.

Here is my setup:

setup.py
sun.py
gfx/sun_1.png
gfx/sun_2.png
gfx/sun_3.png
gfx/core/core_1.png
gfx/core/core_2.png
...
gfx/core/core_99.png

I list everything I want to include in my manifest.in file with:

recursive-include gfx *.png

and when I make a source tar.gz ( via python setup.py bdist --format=rpm )  all of the media assets are included in the resultant tar.gz bundle.

Then I move the source tar.gz into ~/rpmbuild/SOURCES/  and then I run rpmbuild -ba SunnyApp.spec

Unfortunately, none of the gfx are transfered over.   However, if I modify my setup.py as follows:

from setuptools import find_packages

pkgs = find_packages( )

setup(   name='SunnyApp',
         ...
         data_files=[ ('SunnyApp/gfx', ['gfx/sun_1.png', 'gfx/sun_2.png'] ),
                      ('SunnyApp/gfx/core', ['gfx/core/core_1.png', 'gfx/core/core_2.png'] ) ],
         ...
         packages=pkgs,
         ....
         )

Only those files that I list make it into the rpm (in this case sun_1.png, sun_2.png, core_1.png, core_2.png)  Unfortunately, there does not appear to be a way to include *.png for all subdirectories in gfx.

Is there a way to include lots of files with a pattern when calling rpmbuild?  I am not sure how to use package_data to list wildcards because of how I am using packages=find_packages( )

Any suggestions?  Thanks much.