Include folders with subfolders when creating api tarball
(imported from commit b9d564a6cc4ee6e2afa0108b6d9f18af039fc8cf)
This commit is contained in:
parent
79b2572bd4
commit
10a53150a2
10
setup.py
10
setup.py
|
@ -7,6 +7,12 @@ import glob
|
||||||
import os
|
import os
|
||||||
from distutils.core import setup
|
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',
|
setup(name='humbug',
|
||||||
version=humbug.__version__,
|
version=humbug.__version__,
|
||||||
description='Bindings for the Humbug message API',
|
description='Bindings for the Humbug message API',
|
||||||
|
@ -22,9 +28,7 @@ setup(name='humbug',
|
||||||
url='https://humbughq.com/dist/api/',
|
url='https://humbughq.com/dist/api/',
|
||||||
packages=['humbug'],
|
packages=['humbug'],
|
||||||
data_files=[('share/humbug/examples', ["examples/humbugrc", "examples/send-message"])] + \
|
data_files=[('share/humbug/examples', ["examples/humbugrc", "examples/send-message"])] + \
|
||||||
[(os.path.join('share/humbug/', relpath),
|
list(recur_expand('share/humbug', 'integrations/')) + \
|
||||||
glob.glob(os.path.join(relpath, '*'))) for relpath in
|
|
||||||
glob.glob("integrations/*")] + \
|
|
||||||
[('share/humbug/demos',
|
[('share/humbug/demos',
|
||||||
[os.path.join("demos", relpath) for relpath in
|
[os.path.join("demos", relpath) for relpath in
|
||||||
os.listdir("demos")])],
|
os.listdir("demos")])],
|
||||||
|
|
Loading…
Reference in a new issue