Skip to content

Commit

Permalink
bug fix/setup with recursive directory package data (PaddlePaddle#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
Superjomn authored Jan 12, 2018
1 parent e9fb9a6 commit 89c0843
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ def run(self):
'visualdl.server.onnx',
]

datas = []
data_root = os.path.join(TOP_DIR, 'visualdl/server/dist')
for root, dirs, files in os.walk(data_root):
for filename in files:
path = os.path.join(root, filename)[len(data_root)+1:]
datas.append(path)

setup(
name="visualdl",
version=VERSION_NUMBER,
Expand All @@ -84,7 +91,7 @@ def run(self):
keywords="visualization deeplearning",
long_description=read('README.md'),
install_requires=install_requires,
package_data={'visualdl.server': ['dist/*', 'dist/fonts/*'],
package_data={'visualdl.server': datas,
'visualdl':['core.so'],
'visualdl.python':['core.so']},
packages=packages,
Expand Down

0 comments on commit 89c0843

Please sign in to comment.