diff --git a/setup.py b/setup.py index db6f5bb..813a636 100644 --- a/setup.py +++ b/setup.py @@ -7,6 +7,12 @@ import glob import os from distutils.core import setup +def recur_expand(target_root, dir): + for root, _, files in os.walk(dir): + paths = [os.path.join(root, f) for f in files] + if len(paths): + yield os.path.join(target_root, root), paths + setup(name='humbug', version=humbug.__version__, description='Bindings for the Humbug message API', @@ -22,9 +28,7 @@ setup(name='humbug', url='https://humbughq.com/dist/api/', packages=['humbug'], data_files=[('share/humbug/examples', ["examples/humbugrc", "examples/send-message"])] + \ - [(os.path.join('share/humbug/', relpath), - glob.glob(os.path.join(relpath, '*'))) for relpath in - glob.glob("integrations/*")] + \ + list(recur_expand('share/humbug', 'integrations/')) + \ [('share/humbug/demos', [os.path.join("demos", relpath) for relpath in os.listdir("demos")])],