From 3aee2828627cca2ebe84378220fa1fcc0b7c7f7e Mon Sep 17 00:00:00 2001 From: ShenYuhan Date: Tue, 29 Oct 2019 16:39:39 +0800 Subject: [PATCH] add __init__ in templates (#208) * add __init__ in templates * modify setup.py --- paddlehub/serving/templates/__init__.py | 14 ++++++++++++++ setup.py | 11 +++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 paddlehub/serving/templates/__init__.py diff --git a/paddlehub/serving/templates/__init__.py b/paddlehub/serving/templates/__init__.py new file mode 100644 index 00000000..96c37526 --- /dev/null +++ b/paddlehub/serving/templates/__init__.py @@ -0,0 +1,14 @@ +# coding: utf-8 +# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License" +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/setup.py b/setup.py index 6c77b832..c0ca4d79 100644 --- a/setup.py +++ b/setup.py @@ -52,10 +52,13 @@ setup( author_email='paddle-dev@baidu.com', install_requires=REQUIRED_PACKAGES, packages=find_packages(), - data_files=[('paddlehub/serving/templates', [ - 'paddlehub/serving/templates/serving_config.json', - 'paddlehub/serving/templates/main.html' - ])], + package_data={ + 'paddlehub/serving/templates': [ + 'paddlehub/serving/templates/serving_config.json', + 'paddlehub/serving/templates/main.html' + ] + }, + include_package_data=True, # PyPI package information. classifiers=[ 'Development Status :: 4 - Beta', -- GitLab